NodeCanvas Forums › Support › Execute Function Task Errors Out
Tagged: Execute Function
When using the Execute Function action, when I click the “Select Method” button in the action node I get the following error. I’ve used this action plenty of times before, and it’s still working in graphs using it. However, today all of the sudden it seems to no longer be behaving properly. I can’t select any methods via this action.
NullReferenceException: Object reference not set to an instance of an object
NodeCanvas.Tasks.Actions.ExecuteFunction_Multiplatform+<>c.<OnTaskInspectorGUI>b__19_0 (UnityEngine.Component c) (at Assets/ThirdParty/ParadoxNotion/NodeCanvas/Tasks/Actions/ScriptControl/ExecuteFunction_Multiplatform.cs:151)
System.Linq.Enumerable+WhereArrayIterator
1[TSource].MoveNext () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
NodeCanvas.Tasks.Actions.ExecuteFunction_Multiplatform.OnTaskInspectorGUI () (at Assets/ThirdParty/ParadoxNotion/NodeCanvas/Tasks/Actions/ScriptControl/ExecuteFunction_Multiplatform.cs:151)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <695d1cc93cca45069c528c15c9fdd749>:0)
ParadoxNotion.Design.EditorMethodWrapper.Invoke (System.Object[] args) (at Assets/ThirdParty/ParadoxNotion/CanvasCore/Common/Design/PartialEditor/EditorWrapperFactory.cs:122)
NodeCanvas.Editor.TaskEditor.ShowInspector (System.Action1[T] callback, System.Boolean showTitlebar) (at Assets/ThirdParty/ParadoxNotion/CanvasCore/Framework/Design/PartialEditor/Editors/TaskEditor.cs:171)
NodeCanvas.Editor.TaskEditor.ShowTaskInspectorGUI (NodeCanvas.Framework.Task task, System.Action
1[T] callback, System.Boolean showTitlebar) (at Assets/ThirdParty/ParadoxNotion/CanvasCore/Framework/Design/PartialEditor/Editors/TaskEditor.cs:106)
NodeCanvas.Editor.TaskEditor.TaskFieldSingle (NodeCanvas.Framework.Task task, System.Action1[T] callback, System.Boolean showTitlebar) (at Assets/ThirdParty/ParadoxNotion/CanvasCore/Framework/Design/PartialEditor/Editors/TaskEditor.cs:33)
NodeCanvas.Framework.ActionList.ShowNestedActionsGUI () (at Assets/ThirdParty/ParadoxNotion/CanvasCore/Framework/Runtime/Tasks/ActionList.cs:274)
NodeCanvas.StateMachines.OnFSMEnter.OnNodeInspectorGUI () (at Assets/ThirdParty/ParadoxNotion/NodeCanvas/Modules/StateMachines/Nodes/OnFSMEnter.cs:80)
NodeCanvas.Framework.Node.ShowNodeInspectorGUI (NodeCanvas.Framework.Node node) (at Assets/ThirdParty/ParadoxNotion/CanvasCore/Framework/Design/PartialEditor/Editor.Node.cs:774)
NodeCanvas.Editor.GraphEditor.ShowInspectorGUIPanel (NodeCanvas.Framework.Graph graph, UnityEngine.Vector2 canvasMousePos) (at Assets/ThirdParty/ParadoxNotion/CanvasCore/Framework/Design/Editor/Windows/GraphEditor.Panels.cs:153)
NodeCanvas.Editor.GraphEditor.ShowPanels (NodeCanvas.Framework.Graph graph, UnityEngine.Vector2 canvasMousePos) (at Assets/ThirdParty/ParadoxNotion/CanvasCore/Framework/Design/Editor/Windows/GraphEditor.Panels.cs:56)
NodeCanvas.Editor.GraphEditor.OnGUI () (at Assets/ThirdParty/ParadoxNotion/CanvasCore/Framework/Design/Editor/Windows/GraphEditor.cs:525)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <55729f52d042492e9efc384182ae2feb>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <55729f52d042492e9efc384182ae2feb>:0)
UnityEditor.DockArea.OldOnGUI () (at <55729f52d042492e9efc384182ae2feb>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <e88faa3aac574192a3ac9d4dae8147a1>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <1c34070ddd5b426b8f32df1db927aad1>:0)
The error takes me to line 151 in ExecuteFunction_Multiplatform.
Hello,
It seems that you have a ‘missing’ monobehaviour script attached in your gameobject. Can you please confirm if that is indeed the case?
Thank you.
Join us on Discord: https://discord.gg/97q2Rjh
Oof, yeah that was it. If it was a snake it would have bit me. Thanks for your help!