/// <summary> /// Create the GraphUtility Instance with te right view and data /// </summary> /// <param name="targetGraphView"></param> /// <param name="targetGraph"></param> /// <returns></returns> public static GraphSaveUtility GetInstance(DialogueView targetGraphView, Dialogue targetGraph) { return(new GraphSaveUtility { _targetGraphView = targetGraphView, _targetGraph = targetGraph }); }
public void Init(DialogueView graphView, EditorWindow window) { _graphView = graphView; _window = window; //Indentation hack as a transparent icon _indentationIcon = new Texture2D(1, 1); _indentationIcon.SetPixel(0, 0, new Color(0, 0, 0, 0)); _indentationIcon.Apply(); }
/// <summary> /// Sets the name of the graph view and streches it to the whole of the editor window /// </summary> private void ConstructGraphView() { _graphView = new DialogueView(this) { name = "Dialogue Graph;" }; _graphView.StretchToParentSize(); rootVisualElement.Add(_graphView); }