How to "SetAnimationType" in Unity 5

Hi guys,

I’m porting my Unity 4.6 project to Unity 5 but I’m having a few issues with my scripts. I used the following line of script in Unity 4.6 to set an animation clip to humanoid:

AnimationUtility.SetAnimationType((UnityEngine.AnimationClip)animClip, ModelImporterAnimationType.Human);

Then saved the change. This code is now obsolete in Unity 5 scripting engine as the SetAnimationType method is now gone. How do I port? And are changes like this documented anywhere?

Thanks in advance! :slight_smile:

I just ran into the issue myself and it looks like you just don’t need the call in Unity 5. What I’ve done in my project is:

#if UNITY_5
    // do nothing
#else
    // set animation type
    AnimationUtility.SetAnimationType(...);
#endif