Great tutorial, very informative but I ran into an issue.
Adding the function for the “Test YNCI Button” in the “TestModalWindow” script was straightforward enough, but the function does not appear in the On Click options for the button… I can’t figure out why it does not appear, can anyone offer some insight?
You can see the script does indeed contain the Function:

Yet does not appear as a selection:

Can anyone explain what I may have done wrong?
Thanks.
Also, you can see that “public Sprite icon;” is in the code:

But does not show up as an option in the Inspector for “Test YNCI Button”:

Shouldn’t it?
When I run the game, I now get this error: for the previous function:
Assets\Scripts\TestModalWindow.cs(38,20): error CS7036: There is no argument given that corresponds to the required formal parameter ‘cancelEvent’ of ‘ModalPanel.Choice(string, Sprite, UnityAction, UnityAction, UnityAction)’
I closed the editor and re-opened it in hopes that any connection issues would be resolved, but that only made it worse… this is baffling:

There is a MonoBehaviour in the file and it does match the file name…
What could account for this?
On Unity startup I am now getting a very weird error that makes no sense… what could cause this?
ArgumentException: Object at index 0 is null
UnityEditor.SerializedObject…ctor (UnityEngine.Object[ ] objs) (at C:/buildslave/unity/build/Editor/Mono/SerializedObject.bindings.cs:34)
UnityEditor.EditorGUI.FillPropertyContextMenu (UnityEditor.SerializedProperty property, UnityEditor.SerializedProperty linkedProperty, UnityEditor.GenericMenu menu) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:2367)
UnityEditor.EditorGUI.DoPropertyContextMenu (UnityEditor.SerializedProperty property, UnityEditor.SerializedProperty linkedProperty, UnityEditor.GenericMenu menu) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:2468)
UnityEditor.EditorGUI.EndProperty () (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:5661)
UnityEditor.EditorGUI.DefaultPropertyField (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6341)
UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.Rect visibleArea) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:149)
UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:106)
UnityEditor.PropertyHandler.OnGUILayout (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[ ] options) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:208)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[ ] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:9362)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUILayoutOption[ ] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:9346)
UnityEditor.GenericInspector.MissingMonoBehaviourGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/GenericInspector.cs:138)
UnityEditor.GenericInspector.OnInspectorGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/GenericInspector.cs:198)
UnityEditor.UIElements.InspectorElement+c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:501)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
There is no “buildslave” directory on my C drive.