void DisposeMapsIfCreated() { if (HasCreatedMaps) { ColliderMap.Dispose(); TargetMap.Dispose(); LargeColliders.Dispose(); } }
protected override void OnDestroy() { if (m_PossibleCollisions.IsCreated) { m_PossibleCollisions.Dispose(); } if (m_FrameCollisions0.IsCreated) { m_FrameCollisions0.Dispose(); } if (m_FrameCollisions1.IsCreated) { m_FrameCollisions1.Dispose(); } if (m_CellOffsets.IsCreated) { m_CellOffsets.Dispose(); } }