void OnDestroy() { RenderEvent.RemoveRenderEvent(Camera.main, DrawOutline); if (Spheres != null) { for (int i = 0; i < Spheres.Count; i++) { DestroyImmediate(Spheres[i]); } } }
void OnDestroy() { RenderEvent.RemoveRenderEvent(Camera.main, DrawOutline); if (FluidSpheres != null) { for (int i = 0; i < FluidSpheres.Length; i++) { DestroyImmediate(FluidSpheres[i]); FluidSpheres[i] = null; } } if (BoundarySpheres != null) { for (int i = 0; i < BoundarySpheres.Length; i++) { DestroyImmediate(BoundarySpheres[i]); BoundarySpheres[i] = null; } } }
void OnDestroy() { RenderEvent.RemoveRenderEvent(Camera.main, DrawOutline); }