public static GraphSaveUtility GetInstance(StoryGraphView graphView) { return(new GraphSaveUtility { _graphView = graphView }); }
private void ConstructGraphView() { _graphView = new StoryGraphView(this) { name = "Narrative Graph", }; _graphView.StretchToParentSize(); rootVisualElement.Add(_graphView); }
private void ConstructGraphView() { _graphView = new StoryGraphView { name = _filePath != null?Path.GetFileName(_filePath) : "Unsaved New Narrative" }; _graphView.StretchToParentSize(); rootVisualElement.Add(_graphView); }
public void Configure(EditorWindow window, StoryGraphView graphView) { _window = window; _graphView = graphView; //Transparent 1px indentation icon as a hack _indentationIcon = new Texture2D(1, 1); _indentationIcon.SetPixel(0, 0, new Color(0, 0, 0, 0)); _indentationIcon.Apply(); }
private void CreateNew() { var loadFilePath = EditorUtility.SaveFilePanelInProject("Create Narrative", "New narrative", "asset", ""); var saveUtility = GraphSaveUtility.GetInstance(_graphView); _graphView = new StoryGraphView { name = "Narrative Graph" }; _filePath = loadFilePath; UpdateTitle(); }