- changed status to resolved
AmbiguousMatchException: Ambiguous matching in method resolution
In Unity 2018.2 it seems like UnityEvents aren't correctly serialized anymore (see image attached below).
It looked fine and I got no exception in Unity 2018.1.
This is the console log:
AmbiguousMatchException: Ambiguous matching in method resolution
System.Reflection.Binder.FindMostDerivedMatch (System.Reflection.MethodBase[] match) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/Binder.cs:106)
System.MonoType.GetMethodImpl (System.String name, BindingFlags bindingAttr, System.Reflection.Binder binder, CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/MonoType.cs:245)
System.Type.GetMethod (System.String name, BindingFlags bindingAttr) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Type.cs:787)
Sirenix.OdinInspector.Editor.UnityPropertyHandlerUtility..cctor () (at F:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Context/PropertyContext.cs:60)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Sirenix.OdinInspector.Editor.UnityPropertyHandlerUtility
Sirenix.OdinInspector.Editor.UnityPropertyDrawer2[UnityEditorInternal.UnityEventDrawer,UnityEngine.Events.UnityEvent]..ctor ()
Sirenix.OdinInspector.Editor.Drawers.UnityEventDrawer
1[UnityEngine.Events.UnityEvent]..ctor () (at F:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/Vector4Drawer.cs:66)
System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:513)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:519)
System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:528)
System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/ConstructorInfo.cs:77)
System.Activator.CreateInstance (System.Type type, Boolean nonPublic) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:372)
System.Activator.CreateInstance (System.Type type) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:254)
Sirenix.OdinInspector.Editor.DrawerLocator.GetDrawer (System.Type drawerType, Boolean forceUniqueDrawerInstance)
Sirenix.OdinInspector.Editor.DrawerLocator+<>c__DisplayClass35_0.<GetAllDrawers>b__2 (Sirenix.OdinInspector.Editor.DrawerInfo info)
UnityEngine.Debug:LogException(Exception)
Sirenix.OdinInspector.Editor.<>c__DisplayClass35_0:<GetAllDrawers>b__2(DrawerInfo)
System.Linq.<CreateWhereIterator>c__Iterator1D1:MoveNext()
Sirenix.Utilities.<Append>d__19
1:MoveNext() (at F:/Sirenix/Sirenix Solution/Sirenix.Utilities/Extensions/LinqExtensions.cs:343)
System.Linq.Enumerable:ToArray(IEnumerable1)
Sirenix.OdinInspector.Editor.DrawerLocator:GetAllDrawers(Type, Type, List
1, Boolean)
Sirenix.OdinInspector.Editor.DrawerLocator:GetValueDrawers(Type) (at F:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Infos/InspectorPropertyInfo.cs:710)
Sirenix.OdinInspector.Editor.DrawerLocator:GetDrawersForMemberInfo(MemberInfo, Type, Boolean) (at F:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Infos/InspectorPropertyInfo.cs:524)
Sirenix.OdinInspector.Editor.DrawerLocator:GetDrawersForProperty(InspectorProperty) (at F:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Infos/InspectorPropertyInfo.cs:535)
Sirenix.OdinInspector.Editor.InspectorUtilities:DrawProperty(InspectorProperty, GUIContent)
Sirenix.OdinInspector.Editor.InspectorUtilities:DrawProperty(InspectorProperty)
Sirenix.OdinInspector.Editor.InspectorUtilities:DrawPropertiesInTree(PropertyTree)
Sirenix.OdinInspector.Editor.PropertyTree:Draw(Boolean)
Sirenix.OdinInspector.Editor.OdinEditor:DrawTree() (at F:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Children/PropertyValueCollection.cs:541)
Sirenix.OdinInspector.Editor.OdinEditor:DrawOdinInspector() (at F:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Children/PropertyValueCollection.cs:533)
Sirenix.OdinInspector.Editor.OdinEditor:OnInspectorGUI() (at F:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Children/PropertyValueCollection.cs:516)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Comments (1)
-
- Log in to comment
This issue is resolved in the latest beta build of Odin.
We are currently working towards the release of the beta, but if you want to get access right you can contact us, with your invoice number, here: http://sirenix.net/support