void OnDestroy() { if (manager == null || instancedMesh == IntPtr.Zero) { return; } manager.DestroyInstancedMesh(ref instancedMesh); }