Exemplo n.º 1
0
        public static void DeselectAllObjectsInLayer(int objectLayer)
        {
            List <GameObject> allObjectsInLayer = ObjectLayerDatabase.Get().GetAllGameObjectsInLayer(objectLayer);

            ObjectSelection.Get().RemoveGameObjectCollectionFromSelection(allObjectsInLayer);
            ObjectSelection.Get().ObjectSelectionGizmos.OnObjectSelectionUpdated();
        }
Exemplo n.º 2
0
 private void RenderMakeAllLayersDynamicButton()
 {
     if (GUILayout.Button(GetContentForMakeAllLayersDynamicButton(), GUILayout.Width(EditorGUILayoutEx.PreferedActionButtonWidth * _actionButtonScale)))
     {
         ObjectLayerDatabase.Get().MakeAllLayersDynamic();
     }
 }
Exemplo n.º 3
0
 private void RenderAssignSelectedObjectsToActiveLayerButton()
 {
     if (GUILayout.Button(GetContentForAssignSelectedObjectsToActiveLayerButton(), GUILayout.Width(EditorGUILayoutEx.PreferedActionButtonWidth * _actionButtonScale)))
     {
         ObjectLayerDatabase.Get().AssignObjectsToLayer(ObjectSelection.Get().GetAllSelectedGameObjects(), _database.ActiveLayer);
     }
 }
Exemplo n.º 4
0
 private void RenderMakeActiveLayerStatic()
 {
     if (GUILayout.Button(GetContentForMakeActiveLayerStatic(), GUILayout.Width(EditorGUILayoutEx.PreferedActionButtonWidth * _actionButtonScale)))
     {
         ObjectLayerDatabase.Get().MakeLayerStatic(_database.ActiveLayer);
     }
 }
Exemplo n.º 5
0
        public static void AppendAllObjectsInLayerToSelection(int objectLayer)
        {
            List <GameObject> allObjectsInLayer = ObjectLayerDatabase.Get().GetAllGameObjectsInLayer(objectLayer);

            ObjectSelection objectSelection = ObjectSelection.Get();

            objectSelection.AddGameObjectCollectionToSelection(allObjectsInLayer);
            ObjectSelection.Get().ObjectSelectionGizmos.OnObjectSelectionUpdated();
        }
Exemplo n.º 6
0
        public static void DeselectAllObjectsInAllLayers()
        {
            List <int> allLayers = ObjectLayerDatabase.Get().GetAllObjectLayers();

            foreach (int objectLayer in allLayers)
            {
                DeselectAllObjectsInLayer(objectLayer);
            }
        }
        public static void SelectAllObjectsInLayer(int objectLayer)
        {
            List <GameObject> allObjectsInLayer = ObjectLayerDatabase.Get().GetAllGameObjectsInLayer(objectLayer);

            ObjectSelection objectSelection = ObjectSelection.Get();

            objectSelection.Clear();
            objectSelection.AddGameObjectCollectionToSelection(allObjectsInLayer);
            ObjectSelection.Get().ObjectSelectionTransformGizmoSystem.OnObjectSelectionUpdated();
        }
Exemplo n.º 8
0
        public static void SelectAllObjectsInAllLayers()
        {
            ObjectSelection objectSelection = ObjectSelection.Get();

            objectSelection.Clear();

            List <int> allLayers = ObjectLayerDatabase.Get().GetAllObjectLayers();

            foreach (int objectLayer in allLayers)
            {
                objectSelection.AddGameObjectCollectionToSelection(ObjectLayerDatabase.Get().GetAllGameObjectsInLayer(objectLayer));
            }
            ObjectSelection.Get().ObjectSelectionGizmos.OnObjectSelectionUpdated();
        }
Exemplo n.º 9
0
 public static void AppendAllObjectsInActiveLayerToSelection()
 {
     AppendAllObjectsInLayerToSelection(ObjectLayerDatabase.Get().ActiveLayer);
 }
Exemplo n.º 10
0
 public static void DeselectAllObjectsInActiveLayer()
 {
     DeselectAllObjectsInLayer(ObjectLayerDatabase.Get().ActiveLayer);
 }
Exemplo n.º 11
0
        public static void AssignSelectedObjectsToLayer(int objectLayer)
        {
            List <GameObject> allSelectedGameObjects = ObjectSelection.Get().GetAllSelectedGameObjects();

            ObjectLayerDatabase.Get().AssignObjectsToLayer(allSelectedGameObjects, objectLayer);
        }
Exemplo n.º 12
0
 private void RenderContentInScrollView()
 {
     EditorGUILabelWidth.Push(EditorGUILayoutEx.PreferedEditorWindowLabelWidth);
     ObjectLayerDatabase.Get().View.Render();
     EditorGUILabelWidth.Pop();
 }
Exemplo n.º 13
0
        public static void EraseAllGameObjectsInLayer(int objectLayer)
        {
            List <GameObject> allGameObjectsInLayer = ObjectLayerDatabase.Get().GetAllGameObjectsInLayer(objectLayer);

            ObjectErase.EraseGameObjectCollection(allGameObjectsInLayer);
        }
Exemplo n.º 14
0
        public static void EraseGameObjectsInAllLayers()
        {
            List <GameObject> allGameObjectsInAllLayers = ObjectLayerDatabase.Get().GetAllGameObjectsInAllLayers();

            ObjectErase.EraseGameObjectCollection(allGameObjectsInAllLayers);
        }