No Popup for selection by "On Click", only an error

Hello,

I wanted to program a game and I wanted to add something to a button, by the section “On Click{}”, and I clicked to “No Function” so I can select a function. But now in the console accrued an error:

NullReferenceException: Object reference not set to an instance of an object
UnityEditorInternal.UnityEventDrawer.BuildPopupList (UnityEngine.Object target, UnityEngine.Events.UnityEventBase dummyEvent, UnityEditor.SerializedProperty listener) (at <1c8c981f35e342fb96463e6793772537>:0)
UnityEditorInternal.UnityEventDrawer.DrawEvent (UnityEngine.Rect rect, System.Int32 index, System.Boolean isActive, System.Boolean isFocused) (at <1c8c981f35e342fb96463e6793772537>:0)
UnityEditorInternal.ReorderableList.DoListElements (UnityEngine.Rect listRect, UnityEngine.Rect visibleRect) (at <1c8c981f35e342fb96463e6793772537>:0)
UnityEditorInternal.ReorderableList.DoList (UnityEngine.Rect rect, UnityEngine.Rect visibleRect) (at <1c8c981f35e342fb96463e6793772537>:0)
UnityEditorInternal.ReorderableList.DoList (UnityEngine.Rect rect) (at <1c8c981f35e342fb96463e6793772537>:0)

I already restarted Unity and I cleared the Cache.

Can somebody help me?

a missing script on the target object might cause it

6 Likes

I had the same error just see in unity if the script has a error below the file

This error is probably there because the class is not the same name as the file name
I’m not sure if that’s the error but that’s the way if fixed it

Thank you for helping, unfortunatley, that was not my error, I got it fixed by a quick restart of Unity. Have a good day!

Thank you - this solved the problem for me