private void Cleanup() { RemoveSubComponents(); environs.Dispose(); normals.Dispose(); liquids.Dispose(); wiredNavMesh.Dispose(); solidNavMesh.Dispose(); }
private void Cleanup() { RemoveSubComponents(); environs.Dispose(); normals.Dispose(); liquids.Dispose(); if (wiredNavMesh != null) { wiredNavMesh.Dispose(); } if (solidNavMesh != null) { solidNavMesh.Dispose(); } }