コード例 #1
0
    private void DrawInstancePannel()
    {
        if (!ConstellationScript.IsDifferentThanSource /*|| NodeEditorNodes.IsTutorial()*/)
        {
            return;
        }

        GUI.color = Color.yellow;
        Event e      = Event.current;
        var   x      = 0;
        var   y      = 40;
        var   width  = 100;
        var   height = 25;

        if (GUI.Button(new Rect(x, y, width, height), "Apply"))
        {
            if (ConstellationScript.IsInstance)
            {
                ConstellationScript.IsDifferentThanSource = false;
            }
            ScriptDataService.SaveInstance();
        }
        GUI.color = Color.white;
    }
コード例 #2
0
    private void DrawInstancePannel()
    {
        if (ConstellationScript != null && (!ConstellationScript.IsDifferentThanSource || ConstellationScript.GetType() == typeof(ConstellationTutorialScript)))
        {
            return;
        }

        GUI.color = Color.yellow;
        Event e      = Event.current;
        var   x      = 0;
        var   y      = 40;
        var   width  = 100;
        var   height = 25;

        if (GUI.Button(new Rect(x, y, width, height), "Apply"))
        {
            if (ConstellationScript.IsInstance)
            {
                ConstellationScript.IsDifferentThanSource = false;
            }
            ScriptDataService.SaveInstance(ScriptDataService.GetEditorData().LastOpenedConstellationPath[0]);
        }
        GUI.color = Color.white;
    }
コード例 #3
0
 public void SaveInstance()
 {
     scriptDataService.SaveInstance();
 }