public void RemoveContainerChildren()
        {
            GameObject container = editorTarget.container as GameObject;

            if (!container)
            {
                return;
            }

            List <Transform> list = new List <Transform>();

            foreach (Transform child in container.transform)
            {
                list.Add(child);
            }

            foreach (Transform child in list)
            {
                GameObject go = child.gameObject;

                PrefabPainterEditor.DestroyImmediate(go);
            }

            // remove spline instances
            editorTarget.splineSettings.prefabInstances.Clear();
        }
Beispiel #2
0
        public void RemoveContainerChildren()
        {
            GameObject container = gizmo.container as GameObject;

            List <Transform> list = new List <Transform>();

            foreach (Transform child in container.transform)
            {
                list.Add(child);
            }

            foreach (Transform child in list)
            {
                GameObject go = child.gameObject;

                PrefabPainterEditor.DestroyImmediate(go);
            }
        }