Пример #1
0
        void OnResize()
        {
            _backend?.Dispose();
            if (_tiles.IsCreated)
            {
                _tiles.Dispose();
            }


            _backend = new SimpleMeshBackend(_size, _size, Allocator.Persistent);
            //_backend = new MeshDataJobBackend(_size, _size, Allocator.Persistent);
            _tiles = new TileData(_size, _size, Allocator.Persistent);
        }
Пример #2
0
 public void Dispose()
 {
     _tiles.Dispose();
     _backend.Dispose();
 }
Пример #3
0
 void OnDisable()
 {
     _backend.Dispose();
     _tiles.Dispose();
 }