Hi everyone, I’m building graph-based dialogue editor following video on this channel with some modifications I’m still learning GraphView API and enjoying working with it but I’m not always able to figure out salvation for my problem. From some observations I think that copy and cut works by default, correct me if I’m wrong. For now, I’m stuck with pasting and duplicating nodes. After long web searching time and not finding any useful info I decided to ask for a hand.
This probably won’t find much useful information either.
How to report your problem productively in the Unity3D forums:
If you are still looking you need to set the delegates
/// <summary>
/// <para>Callback for serializing graph elements for copy/paste and other actions.</para>
/// </summary>
public UnityEditor.Experimental.GraphView.GraphView.SerializeGraphElementsDelegate serializeGraphElements { get; set; }
/// <summary>
/// <para>Ask whether or not the serialized data can be pasted.</para>
/// </summary>
public UnityEditor.Experimental.GraphView.GraphView.CanPasteSerializedDataDelegate canPasteSerializedData { get; set; }
/// <summary>
/// <para>Callback for unserializing graph elements and adding them to the graph.</para>
/// </summary>
public UnityEditor.Experimental.GraphView.GraphView.UnserializeAndPasteDelegate unserializeAndPaste { get; set; }
/// <summary>
/// <para>Delete selection callback.</para>
/// </summary>
public UnityEditor.Experimental.GraphView.GraphView.DeleteSelectionDelegate deleteSelection { get; set; }
1 Like