public ObjectGroup CreateObjectGroup(string groupName)
        {
            if (!string.IsNullOrEmpty(groupName))
            {
                ObjectGroup newObjectGroup = ObjectGroupFactory.Create(groupName, GetAllObjectGroupNames());

                _objectGroups.AddEntity(newObjectGroup);
                if (NumberOfGroups == 1)
                {
                    SetActiveObjectGroup(newObjectGroup);
                }

                PrefabManagementWindow.Get().Repaint();
                return(newObjectGroup);
            }

            return(null);
        }
        public ObjectGroup CreateObjectGroup(GameObject gameObject)
        {
            if (ContainsObjectGroup(gameObject))
            {
                Debug.LogWarning("This object is already marked as an object group.");
                return(GetObjectGroup(gameObject));
            }

            ObjectGroup newObjectGroup = ObjectGroupFactory.Create(gameObject, GetAllObjectGroupNames());

            _objectGroups.AddEntity(newObjectGroup);
            if (NumberOfGroups == 1)
            {
                SetActiveObjectGroup(newObjectGroup);
            }

            PrefabManagementWindow.Get().Repaint();
            return(newObjectGroup);
        }