void OnPlayStateChanged(PlayModeStateChange state)
    {
        /*WindowInstance.RequestSetup();
         * WindowInstance.previousSelectedGameObject = null;*/
        previousSelectedGameObject = null;
        if (state == PlayModeStateChange.EnteredEditMode)
        {
            ResetInstances();
            Open(ScriptDataService.currentPath[0]);
        }

        if (state == PlayModeStateChange.ExitingEditMode && !ScriptDataService.GetEditorData().ExampleData.openExampleConstellation)
        {
            ParseScript();
        }

        if (ScriptDataService.GetEditorData().ExampleData.openExampleConstellation&& state == PlayModeStateChange.EnteredPlayMode)
        {
            var nodeExampleLoader = new ExampleSceneLoader();
            nodeExampleLoader.RunExample(ScriptDataService.GetEditorData().ExampleData.constellationName, ScriptDataService);
            ScriptDataService.GetEditorData().ExampleData.openExampleConstellation = false;
        }

        /*EditorApplication.playModeStateChanged -= OnPlayStateChanged;
         * WindowInstance.RequestRepaint();*/
    }
예제 #2
0
 void SetupNodeSelector()
 {
     NodeSelector = new NodeSelectorPanel(ScriptDataService.GetEditorData().ScriptAssembly.GetAllStaticScriptData());
     NodeSelector.SetupNamespaceData((ScriptDataService.GetEditorData().ScriptAssembly.GetAllStaticScriptData()));
 }