Example #1
0
        private void EnablePickingNoUndo(Scene scene)
        {
            if (!scene.IsValid())
            {
                return;
            }

            SceneVisibilityState.EnablePicking(scene);
        }
Example #2
0
        internal void DisablePickingNoUndo(Scene scene)
        {
            if (!scene.IsValid())
            {
                return;
            }

            SceneVisibilityState.EnablePicking(scene);
            SceneVisibilityState.SetGameObjectsPickingDisabled(scene.GetRootGameObjects(), true, true);
        }
Example #3
0
        private void EnablePicking(Scene scene, bool sendContentChangedEvent)
        {
            if (!scene.IsValid())
            {
                return;
            }

            SceneVisibilityState.EnablePicking(scene);

            if (sendContentChangedEvent)
            {
                PickableContentChanged();
            }
        }
Example #4
0
 public void EnableAllPicking()
 {
     Undo.RecordObject(SceneVisibilityState.GetInstance(), "Enable All Picking");
     if (StageNavigationManager.instance.currentItem.isPrefabStage)
     {
         SceneVisibilityState.EnablePicking(StageNavigationManager.instance.GetCurrentPrefabStage().scene);
     }
     else
     {
         for (int i = 0; i < SceneManager.sceneCount; i++)
         {
             EnablePickingNoUndo(SceneManager.GetSceneAt(i));
         }
     }
 }
Example #5
0
        internal void DisablePicking(Scene scene, bool sendContentChangedEvent)
        {
            if (!scene.IsValid())
            {
                return;
            }

            SceneVisibilityState.EnablePicking(scene);
            SceneVisibilityState.SetGameObjectsPickingDisabled(scene.GetRootGameObjects(), true, true);

            if (sendContentChangedEvent)
            {
                PickableContentChanged();
            }
        }
Example #6
0
        internal void DisablePickingNoUndo(Scene scene)
        {
            if (!scene.IsValid())
            {
                return;
            }

            if (!scene.isLoaded)
            {
                return;
            }

            SceneVisibilityState.EnablePicking(scene);
            scene.GetRootGameObjects(m_RootBuffer);
            SceneVisibilityState.SetGameObjectsPickingDisabled(m_RootBuffer.ToArray(), true, true);
        }
Example #7
0
 private void DisableAllPickingNoUndo()
 {
     if (StageNavigationManager.instance.currentItem.isPrefabStage)
     {
         var scene = StageNavigationManager.instance.GetCurrentPrefabStage().scene;
         SceneVisibilityState.EnablePicking(StageNavigationManager.instance.GetCurrentPrefabStage().scene);
         SceneVisibilityState.DisablePicking(scene);
     }
     else
     {
         for (int i = 0; i < SceneManager.sceneCount; i++)
         {
             DisablePicking(SceneManager.GetSceneAt(i));
         }
     }
 }
Example #8
0
        public void EnableAllPicking()
        {
            Undo.RecordObject(SceneVisibilityState.GetInstance(), "Enable All Picking");
            PreviewSceneStage previewSceneStage = StageNavigationManager.instance.currentStage as PreviewSceneStage;

            if (previewSceneStage != null)
            {
                SceneVisibilityState.EnablePicking(previewSceneStage.scene);
            }
            else
            {
                for (int i = 0; i < SceneManager.sceneCount; i++)
                {
                    EnablePickingNoUndo(SceneManager.GetSceneAt(i));
                }
            }
        }
Example #9
0
        private void DisableAllPickingNoUndo()
        {
            PreviewSceneStage previewSceneStage = StageNavigationManager.instance.currentStage as PreviewSceneStage;

            if (previewSceneStage != null)
            {
                var scene = previewSceneStage.scene;
                SceneVisibilityState.EnablePicking(previewSceneStage.scene);
                SceneVisibilityState.DisablePicking(scene);
            }
            else
            {
                for (int i = 0; i < SceneManager.sceneCount; i++)
                {
                    DisablePicking(SceneManager.GetSceneAt(i));
                }
            }
        }