Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

5.4.18 Edit Animation Bug (breaks editor)

Discussion in '5.4 Beta' started by Caliber-Mengsk, May 20, 2016.

  1. Caliber-Mengsk

    Caliber-Mengsk

    Joined:
    Mar 24, 2010
    Posts:
    689
    So I just went in to change an animation event call, and when I click on the animation even, I get this error:
    Code (csharp):
    1.  
    2. AmbiguousMatchException: Ambiguous matching in method resolution
    3. System.Reflection.Binder.FindMostDerivedMatch (System.Reflection.MethodBase[] match) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/Binder.cs:106)
    4. 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)
    5. System.Type.GetMethod (System.String name, BindingFlags bindingAttr) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Type.cs:787)
    6. UnityEditor.AnimationEventPopup.FormatEvent (UnityEngine.GameObject root, UnityEngine.AnimationEvent evt) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationEventPopup.cs:147)
    7. UnityEditor.AnimationEventTimeLine.EventLineGUI (Rect rect, UnityEditorInternal.AnimationWindowState state) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/Deprecated/AnimationEventTimeline.cs:150)
    8. UnityEditor.AnimEditor.EventLineOnGUI (Rect eventsRect) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimEditor.cs:392)
    9. UnityEditor.AnimEditor.OnAnimEditorGUI (UnityEditor.EditorWindow parent, Rect position) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimEditor.cs:181)
    10. UnityEditor.AnimationWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindow.cs:63)
    11. 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)
    12.  
    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)
     
  2. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    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 :)
     
  3. Caliber-Mengsk

    Caliber-Mengsk

    Joined:
    Mar 24, 2010
    Posts:
    689
    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.)
     
  4. BrainAndBrain

    BrainAndBrain

    Joined:
    Nov 27, 2014
    Posts:
    115
    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.