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

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

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

            SceneVisibilityState.EnablePicking(scene);

            if (sendContentChangedEvent)
            {
                PickableContentChanged();
            }
        }
示例#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));
         }
     }
 }
示例#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();
            }
        }
示例#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);
        }
示例#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));
         }
     }
 }
示例#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));
                }
            }
        }
示例#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));
                }
            }
        }