Ejemplo n.º 1
0
        public override void DoInspectorGUI()
        {
            using (new NamedVerticalScope("Group"))
            {
                GroupBrush group = (GroupBrush)target;

                GUILayout.BeginHorizontal();

                if (GUILayout.Button("Select Brushes"))
                {
                    // select all of the child brush objects.
                    List <Object> objects = Selection.objects.ToList();
                    objects.Remove(group.gameObject);
                    foreach (Transform child in group.transform)
                    {
                        if (child.GetComponent <BrushBase>())
                        {
                            objects.Add(child.gameObject);
                        }
                    }
                    Selection.objects = objects.ToArray();
                }

                if (GUILayout.Button("Ungroup Brushes"))
                {
                    TransformHelper.UngroupSelection();
                }

                GUILayout.EndHorizontal();
            }
        }
Ejemplo n.º 2
0
 public static void Ungroup()
 {
     TransformHelper.UngroupSelection();
 }