Assets/Scripts/Dialogue/Editor/GraphSaveUtility.cs
/// <summary>
/// Set Entry point GUID then Get All Nodes, remove all and their edges. Leave only the entrypoint node. (Remove its edge too)
/// </summary>
Set Entry point GUID then Get All Nodes, remove all and their edges. Leave only the entrypoint node. (Remove its edge too)
Set Entry point GUID then Get All Nodes remove all and their edges . Leave only the entrypoint node . ( Remove its edge too )
private void ClearGraph()
    {
        Nodes.Find(x => x.EntryPoint).GUID = _dialogueContainer.NodeLinks[0].BaseNodeGUID;
        foreach (var perNode in Nodes)
        {
            if (perNode.EntryPoint) continue;
            Edges.Where(x => x.input.node == perNode).ToList()
                .ForEach(edge => _graphView.RemoveElement(edge));
            _graphView.RemoveElement(perNode);
        }
    }
private void ClearGraph ( ) { Nodes . Find ( x => x . EntryPoint ) . GUID = _dialogueContainer . NodeLinks [ 0 ] . BaseNodeGUID ; foreach ( var perNode in Nodes ) { if ( perNode . EntryPoint ) continue ; Edges . Where ( x => x . input . node == perNode ) . ToList ( ) . ForEach ( edge => _graphView . RemoveElement ( edge ) ) ; _graphView . RemoveElement ( perNode ) ; } }
Set Entry point GUID then Get All Nodes, remove all and their edges.
Set Entry point GUID then Get All Nodes remove all and their edges .