public void OnAfterDeserialize()
 {
     editorGroups.Clear();
     editorGroups.UnionWith(_values);
     SelectionGroupManager.ClearEditorGroups();
     foreach (var i in _values)
     {
         SelectionGroupManager.Register(i);
     }
 }
Пример #2
0
        void CreateSceneSelectionGroup(string name, string query, Color color, IList <Object> members)
        {
            var g = new GameObject(name);

            Undo.RegisterCreatedObjectUndo(g, "New Scene Selection Group");
            var group = g.AddComponent <Unity.SelectionGroups.Runtime.SelectionGroup>();

            group.Name        = name;
            group.Query       = query;
            group.Color       = color;
            group.Scope       = SelectionGroupDataLocation.Scene;
            group.ShowMembers = true;
            group.Add(members);
            SelectionGroupManager.Register(group);
        }
Пример #3
0
        void CreateEditorSelectionGroup(string name, string query, Color color, IList <Object> members)
        {
            var g = new SelectionGroup
            {
                Name        = name,
                Color       = color,
                ShowMembers = true,
                Scope       = SelectionGroupDataLocation.Editor,
                Query       = query
            };

            g.Add(members);
            Undo.RegisterCompleteObjectUndo(this, "New Editor Selection Group");
            editorGroups.Add(g);
            Save();
            SelectionGroupManager.Register(g);
        }