Skip to content

LogicEditor | Copy-pasting nodes throws nullRef for edges

Summary

When copying and pasting a node setup with edges, all edges will get lost, throwing a nullRef for each edge.

Steps to reproduce

  1. Build a node setup, e.g. [I] Object Info connected to [R] Visibility
  2. Copy the setup
  3. Paste the nodes
  4. Edges will not be copied and nullRef will be thrown

What is the current bug behavior?

Edges in node setups can not be copied and pasted

What is the expected correct behavior?

Edges should persist pasting


Version

0.4.3-preview and 1.1 of logic editor

Build Target

N/A

Mode

N/A


Relevant logs and/or screenshots

NullReferenceException: Object reference not set to an instance of an object
GraphProcessor.SerializableEdge.Deserialize () (at Assets/__ThirdParty/NodeGraphProcessor/Runtime/Utils/SerializableEdge.cs:76)
GraphProcessor.BaseGraphView.UnserializeAndPasteCallback (System.String operationName, System.String serializedData) (at Assets/__ThirdParty/NodeGraphProcessor/Editor/Views/BaseGraphView.cs:293)
UnityEditor.Experimental.GraphView.GraphView.UnserializeAndPasteOperation (System.String operationName, System.String data) (at <befe1da3a3b04f65bc0e7477f9f320a0>:0)
UnityEditor.Experimental.GraphView.GraphView.PasteCallback () (at <befe1da3a3b04f65bc0e7477f9f320a0>:0)
UnityEditor.Experimental.GraphView.GraphView.OnExecuteCommand (UnityEngine.UIElements.ExecuteCommandEvent evt) (at <befe1da3a3b04f65bc0e7477f9f320a0>:0)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.PropagationPhase propagationPhase) (at <f2e1435fec084ff693c649189d4dffd4>:0)
UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.PropagationPhase propagationPhase) (at <f2e1435fec084ff693c649189d4dffd4>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <f2e1435fec084ff693c649189d4dffd4>:0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <f2e1435fec084ff693c649189d4dffd4>:0)
UnityEngine.UIElements.CommandEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <f2e1435fec084ff693c649189d4dffd4>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <f2e1435fec084ff693c649189d4dffd4>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <f2e1435fec084ff693c649189d4dffd4>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <f2e1435fec084ff693c649189d4dffd4>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <f2e1435fec084ff693c649189d4dffd4>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <f2e1435fec084ff693c649189d4dffd4>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <f2e1435fec084ff693c649189d4dffd4>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <f2e1435fec084ff693c649189d4dffd4>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <f2e1435fec084ff693c649189d4dffd4>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <89d2c0fe37e0454991daf2807b7dcb63>:0)
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()

Possible fixes

N/A