예제 #1
0
 void ReleaseResources()
 {
     if (_argsBuffer != null)
     {
         _argsBuffer.Release();
         _argsBuffer = null;
     }
     if (_voxelData != null)
     {
         _voxelData.Dispose();
         _voxelData = null;
     }
 }
예제 #2
0
        void SampleMesh()
        {
            skinnedMesh.BakeMesh(_mesh);

            _bounds.Encapsulate(_mesh.bounds.min);
            _bounds.Encapsulate(_mesh.bounds.max);

            if (_voxelData != null)
            {
                _voxelData.Dispose();
                _voxelData = null;
            }
            _voxelData = GPUVoxelizer.Voxelize(voxelizer, _mesh, resolution);
        }