5.4.18 Edit Animation Bug (breaks editor)

So I just went in to change an animation event call, and when I click on the animation even, I get this error:

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)
UnityEditor.AnimationEventPopup.FormatEvent (UnityEngine.GameObject root, UnityEngine.AnimationEvent evt) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationEventPopup.cs:147)
UnityEditor.AnimationEventTimeLine.EventLineGUI (Rect rect, UnityEditorInternal.AnimationWindowState state) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/Deprecated/AnimationEventTimeline.cs:150)
UnityEditor.AnimEditor.EventLineOnGUI (Rect eventsRect) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimEditor.cs:392)
UnityEditor.AnimEditor.OnAnimEditorGUI (UnityEditor.EditorWindow parent, Rect position) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimEditor.cs:181)
UnityEditor.AnimationWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindow.cs:63)
System.Reflection.MonoMethod.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:222)

Not sure what it means really, but thought it should be noted. Can’t change anything in the animation tab after that and the editor doesn’t seem to want to do a ton until it’s been restarted.

Got a video showing what happens: (easily repeatable)

Hi,

You should only get AmbiguousMatchException if there are two functions with conflicting names in your code. As a workaround, you can look around in your scripts and rename those functions to avoid any ambiguity.

Do you mind logging a bug to that effect? The animation window shouldn’t break because of that!

Thank :slight_smile:

So… overloading functions doesn’t work in the animation window now? That’s rather annoying.

(honestly, I made the second overloaded function after setting up the animation events, but still, I don’t see why overloading a function would break it.)

I ran into this in a 5.3 release as well; nice to know it’s due to overloads. But agreed that overloaded functions should work.