Reply To: Node canvas UI bug

Forums 💬 NodeCanvas ⚙️ Support Node canvas UI bug Reply To: Node canvas UI bug

#15828
weezah
Participant

    Hello,

    I have the same bug.

    The item list does not populate.

     

    NullReferenceException: Object reference not set to an instance of an object

    ParadoxNotion.Design.EditorUtils.GetMenuItems (UnityEditor.GenericMenu menu) (at Assets/ParadoxNotion/CanvasCore/Common/Design/PartialEditor/EditorUtils/EditorUtils.ContextMenus.cs:356)

    ParadoxNotion.Design.GenericMenuBrowser.GenerateTree () (at Assets/ParadoxNotion/CanvasCore/Common/Design/PartialEditor/GenericMenuBrowser.cs:271)

    ParadoxNotion.Services.Threader+<>c__DisplayClass8_0.<StartAction>b__0 () (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Services/Threader.cs:44)

    System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at <695d1cc93cca45069c528c15c9fdd749>:0)

    System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <695d1cc93cca45069c528c15c9fdd749>:0)

    System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <695d1cc93cca45069c528c15c9fdd749>:0)

    System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at <695d1cc93cca45069c528c15c9fdd749>:0)

    System.Threading.ThreadHelper.ThreadStart () (at <695d1cc93cca45069c528c15c9fdd749>:0)

    UnityEngine.<>c:<RegisterUECatcher>b__0_0(Object, UnhandledExceptionEventArgs)

     

     

    var itemField = typeof(GenericMenu).GetField(“menuItems”, BindingFlags.Instance | BindingFlags.NonPublic);

    var items = itemField.GetValue(menu) as ArrayList;

    In fact, Generic Menu is a sealed class from metadata and “menuItems” is not exposed.

     

    Cheers!