コード例 #1
0
 /// <summary>
 /// 销毁
 /// </summary>
 public void Dispose()
 {
     ObjectPool.Release(ref _resCollection);
     _data      = null;
     _tree      = null;
     _resLoaded = false;
 }
コード例 #2
0
 /// <summary>
 /// 初始化
 /// </summary>
 public void Init(SceneTree tree, SceneTreeNodeObjectData data, int idxPrefab)
 {
     _tree      = tree;
     _data      = data;
     _idxPrefab = idxPrefab;
     if (_tree.data.objType == SceneTreeObjType.Renderer && !_data.lods[0].resCollection.isEmpty)
     {
         _resCollection = ObjectPool.New <ResCollection>();
         _resCollection.Init(_data.lods[0].resCollection);
     }
 }