Example #1
0
 public void DestroyChunk()
 {
     if (_tileChunkPoolNode != null)
     {
         _tileChunkPoolNode.name = "";
         DestroyImmediate(_tileChunkPoolNode.gameObject);
         _tileChunkPoolNode = null;
     }
 }
Example #2
0
        public TileChunkPool InitChunk()
        {
            string     nodeName = name + "_" + MapIdxSelect;
            GameObject obj      = GameObject.Find(nodeName);

            if (obj == null)
            {
                obj = new GameObject();
            }
            obj.name           = nodeName;
            _tileChunkPoolNode = obj.AddComponent <TileChunkPool>();
            return(_tileChunkPoolNode);
        }