Exemple #1
0
    public bool ParseScript(bool refreshTutorials = false)
    {
        if (ConstellationParser == null)
        {
            ConstellationParser = new ConstellationParser();
        }

        if (ScriptDataService == null)
        {
            SetupScriptDataService();
            if (ScriptDataService.OpenedScripts.ToArray().Length > 0)
            {
                Open(ScriptDataService.OpenedScripts.ToArray()[0]);
            }
        }

        ScriptDataService.RefreshConstellationEditorDataList();
        ScriptDataService.UpdateStaticConstellationNodesNames();
        ConstellationParser.UpdateScriptsNodes(ScriptDataService.GetAllStaticScriptsDataInProject(), ScriptDataService.GetAllScriptDataInProject(), new UnityConstellationParser());


        if (refreshTutorials)
        {
            ConstellationParser.UpdateScriptsNodes(ScriptDataService.GetAllStaticScriptsDataInProject(), ScriptDataService.GetAllTutorialScriptsDataInProject(), new UnityConstellationParser());
        }
        ScriptDataService.SetAllScriptsDirty();
        SetupNodeWindow();
        SetupNodeSelector();

        return(true);
    }
    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);
    }