Example #1
0
 public void OpenConstellationInstance(Constellation.Constellation constellation, string path)
 {
     scriptDataService = new ConstellationEditorDataService();
     scriptDataService.OpenConstellationInstance(constellation, path);
     CurrentEditedInstancesName = scriptDataService.currentInstancePath.ToArray();
     Setup();
 }
 public void Recover()
 {
     scriptDataService = new ConstellationEditorDataService();
     if (scriptDataService.OpenEditorData().LastOpenedConstellationPath.Count != 0)
     {
         var scriptData = scriptDataService.Recover(scriptDataService.OpenEditorData().LastOpenedConstellationPath[0]);
         if (scriptData != null)
         {
             Setup();
             return;
         }
     }
 }
Example #3
0
    void SetupWindow()
    {
        if (ScriptDataService == null)
        {
            ScriptDataService = new ConstellationEditorDataService();
            ScriptDataService.Initialize();
        }


        if (NodeTabPanel == null)
        {
            NodeTabPanel = new ConstellationsTabPanel();
        }

        if (NodeSelector == null)
        {
            SetupNodeSelector();
        }
    }
    public void OnEnable()
    {
        EditorApplication.playModeStateChanged += OnPlayStateChanged;
        if (NodeSelector == null)
        {
            NodeSelector = new NodeSelectorPanel(/*, scriptDataService.GetAllCustomNodesNames()*/);
            NodeSelector.SetupNamespaceData();
        }

        if (ScriptDataService == null)
        {
            ScriptDataService = new ConstellationEditorDataService();
            ScriptDataService.Initialize();
        }

        if (NodeTabPanel == null)
        {
            NodeTabPanel = new ConstellationsTabPanel();
        }
    }
    public void OnEnable()
    {
        EditorApplication.playModeStateChanged += OnPlayStateChanged;
        UnityEditor.Undo.undoRedoPerformed     += OnUndoPerformed;

        if (ScriptDataService == null)
        {
            ScriptDataService = new ConstellationEditorDataService();
            ScriptDataService.Initialize();
        }


        if (NodeTabPanel == null)
        {
            NodeTabPanel = new ConstellationsTabPanel();
        }

        if (NodeSelector == null)
        {
            SetupNodeSelector();
        }
    }
    public bool ParseScript()
    {
        if (ConstellationParser == null)
        {
            ConstellationParser = new ConstellationParser();
        }

        if (ScriptDataService == null)
        {
            ScriptDataService = new ConstellationEditorDataService();
            ScriptDataService.Initialize();
            ScriptDataService.ResetConstellationEditorData();
            if (ScriptDataService.currentPath.ToArray().Length > 0)
            {
                Open(ScriptDataService.currentPath.ToArray()[0]);
            }
        }

        ConstellationParser.UpdateScriptsNodes(ScriptDataService.GetAllScriptsInProject(), ScriptDataService.GetAllNestableScriptsInProject());
        SetupNodeWindow();

        return(true);
    }
Example #7
0
 void ResetWindow()
 {
     ScriptDataService = null;
     SetupWindow();
 }
Example #8
0
 private void SetupScriptDataService()
 {
     ScriptDataService = new ConstellationEditorDataService();
     ScriptDataService.Initialize();
     ScriptDataService.ResetConstellationEditorData();
 }
Example #9
0
 public void Open(string _path = "")
 {
     scriptDataService = new ConstellationEditorDataService();
     scriptDataService.OpenConstellation(_path);
     Setup();
 }
Example #10
0
 public void New()
 {
     scriptDataService = new ConstellationEditorDataService();
     scriptDataService.New();
     Setup();
 }