Ejemplo n.º 1
0
        static void OnPlayStateChanged(PlayModeStateChange state)
        {
            WindowInstance.Recover();
            WindowInstance.previousSelectedGameObject = null;

            EditorApplication.playModeStateChanged -= OnPlayStateChanged;
        }
Ejemplo n.º 2
0
        static void OnPlayStateChanged(PlayModeStateChange state)
        {
            if (Application.isPlaying)
            {
                ConstellationUnityWindow.ShowWindow();
                WindowInstance.Recover();
                WindowInstance.CompileScripts();
            }

            WindowInstance.Recover();
            WindowInstance.previousSelectedGameObject = null;
            WindowInstance.ResetInstances();
            if (WindowInstance.scriptDataService.GetEditorData().ExampleData.openExampleConstellation&& state == PlayModeStateChange.EnteredPlayMode)
            {
                var nodeExampleLoader = new ExampleSceneLoader();
                nodeExampleLoader.RunExample(WindowInstance.scriptDataService.GetEditorData().ExampleData.constellationName, WindowInstance.scriptDataService);
                WindowInstance.scriptDataService.GetEditorData().ExampleData.openExampleConstellation = false;
            }

            EditorApplication.playModeStateChanged -= OnPlayStateChanged;
            WindowInstance.Repaint();
        }