Пример #1
0
        public void DestroyWithUndo()
        {
            if (invalid)
            {
                return;
            }
#if UNITY_EDITOR
            ChiselObjectUtility.SafeDestroyWithUndo(partialMesh);
#endif
            ChiselObjectUtility.SafeDestroyWithUndo(sharedMesh);
            ChiselObjectUtility.SafeDestroyWithUndo(container, ignoreHierarchyEvents: true);
        }
        public void DestroyWithUndo()
        {
            if (!generatedDataContainer)
            {
                return;
            }

            if (colliders != null)
            {
                foreach (var collider in colliders)
                {
                    if (collider != null)
                    {
                        collider.DestroyWithUndo();
                    }
                }
            }
            if (renderables != null)
            {
                foreach (var renderable in renderables)
                {
                    if (renderable != null)
                    {
                        renderable.DestroyWithUndo();
                    }
                }
            }
            if (debugHelpers != null)
            {
                foreach (var debugHelper in debugHelpers)
                {
                    if (debugHelper != null)
                    {
                        debugHelper.DestroyWithUndo();
                    }
                }
            }
            ChiselObjectUtility.SafeDestroyWithUndo(colliderContainer, ignoreHierarchyEvents: true);
            ChiselObjectUtility.SafeDestroyWithUndo(generatedDataContainer, ignoreHierarchyEvents: true);
        }
Пример #3
0
 public void DestroyWithUndo()
 {
     ChiselObjectUtility.SafeDestroyWithUndo(meshCollider);
     ChiselObjectUtility.SafeDestroyWithUndo(sharedMesh);
 }