- Home /
Question by
rmccabe82 · Apr 07, 2015 at 10:34 AM ·
c#unity 5animation clip
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! :-)
Comment
Answer by ventureblocks · May 20, 2015 at 01:15 PM
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
Your answer

Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How can I do this with gizmos? 0 Answers
RPGStatSystem tutorial problem with clases visibility? 1 Answer