31 lines
886 B
C#
31 lines
886 B
C#
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace ImageProcessingGraph.Editor.Windows
|
|
{
|
|
[CustomEditor(typeof(ImageProcessingGraphAsset))]
|
|
public class ImageProcessingGraphAssetEditorWindow : UnityEditor.Editor
|
|
{
|
|
public override void OnInspectorGUI()
|
|
{
|
|
if (GUILayout.Button("Open"))
|
|
{
|
|
ImageProcessingGraphEditorWindow.Open((ImageProcessingGraphAsset)target);
|
|
}
|
|
|
|
if(GUILayout.Button("Calculate Dependancy Graph"))
|
|
{
|
|
var bleh = (ImageProcessingGraphAsset)target;
|
|
bleh.runOrder = bleh.GetExecutionOrder(bleh.Nodes, bleh.Connections, true);
|
|
}
|
|
|
|
if(GUILayout.Button("Run Graph"))
|
|
{
|
|
var bleh = (ImageProcessingGraphAsset)target;
|
|
bleh.RunGraph();
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|