Exemplo n.º 1
0
        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;
                }
            }
        }
Exemplo n.º 3
0
 void OnDestroy()
 {
     RenderEvent.RemoveRenderEvent(Camera.main, DrawOutline);
 }