Skip to content

Graph Editors

Thor Brigsted edited this page Jan 30, 2018 · 18 revisions

Example

[CustomNodeGraphEditor(typeof(MyGraph))]
public class MyGraphEditor : NodeGraphEditor {

}

Store preferences specific to your node graph or project

  1. Add a unique EditorPrefs key to the attribute
[CustomNodeGraphEditor(typeof(MyGraph), "MyGraph.Settings")]
  1. Overload GetDefaultPreferences(); to set default preferences
public override NodeEditorPreferences.Settings GetDefaultPreferences() {
    return new NodeEditorPreferences.Settings() {
        gridBgColor = Color.black,
        gridLineColor = Color.white
    };
}
Clone this wiki locally