예제 #1
0
    private void SaveRecord()
    {
        AIAgentChart chart = (AIAgentChart)target;

        EditorUtility.SetDirty(target);
        EditorUtility.SetDirty(chart.agentNode);

        AssetDatabase.Refresh(ImportAssetOptions.ImportRecursive);
        AssetDatabase.SaveAssets();
    }
예제 #2
0
    public override void OnGUI()
    {
        // Keep repainting the GUI of the active NodeEditorWindow
        NodeEditorWindow.current.Repaint();

        if (!isExecuteOnce)
        {
            AIAgentChart chart = (AIAgentChart)target;
            chart.SaveEvent -= SaveRecord;
            chart.SaveEvent += SaveRecord;
            isExecuteOnce    = true;
        }
    }