garettbass / UnityExtensions.ArrayDrawer

ArrayDrawer is a base class like PropertyDrawer, but for arrays and lists.
MIT License
131 stars 21 forks source link

ArgumentException: method arguments are incompatible on Unity 2020.2.5f1 #17

Open Dchandaman opened 3 years ago

Dchandaman commented 3 years ago

Happens on Unity Version 2020.2.5f1

Full callstack:

ArgumentException: method arguments are incompatible
System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure, System.Boolean allowClosed) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
UnityExtensions.ArrayDrawer..cctor () (at Assets/Plugins/ArrayDrawer/Editor/ArrayDrawer.cs:144)
Rethrow as TypeInitializationException: The type initializer for 'UnityExtensions.ArrayDrawer' threw an exception.
UnityExtensions.ReorderableListDrawer..ctor () (at Assets/Plugins/ArrayDrawer/Editor/ReorderableListDrawer.cs:145)
System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Activator.CreateInstance (System.Type type) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
UnityEditor.PropertyHandler.HandleDrawnType (UnityEditor.SerializedProperty property, System.Type drawnType, System.Type propertyType, System.Reflection.FieldInfo field, UnityEngine.PropertyAttribute attribute) (at /Users/bokken/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:116)
UnityEditor.ScriptAttributeUtility.GetHandler (UnityEditor.SerializedProperty property) (at /Users/bokken/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/ScriptAttributeUtility.cs:472)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorGUI.cs:10042)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorGUI.cs:10036)
UnityEditor.Editor.DoDrawDefaultInspector (UnityEditor.SerializedObject obj) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:747)
UnityEditor.Editor.DoDrawDefaultInspector () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:761)
UnityEditor.Editor.DrawDefaultInspector () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:732)
UnityEditor.Editor.OnInspectorGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:787)
GameDataManagerEditor.OnInspectorGUI () (at Assets/Scripts/Editor/GameDataManagerEditor.cs:144)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at /Users/bokken/buildslave/unity/build/External/MirroredPackageSources/com.unity.ui/Editor/Inspector/InspectorElement.cs:546)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
garettbass commented 3 years ago

A pull request to fix this issue would be welcome.

Dchandaman commented 3 years ago

I just found the issue. I have a fix for it shortly

DDru commented 2 years ago

In Unity 2022.1.x not work and fix too