These are notes to be aware of when upgrading projects from Unity 4 to Unity 5, if your project uses animation features.
In 5.0 we introduced an API that allows you to build and edit Mecanim assets in the editor. For users that have previously used the unsupported API (in UnityEditorInternal namespace) you will need to manually update your scripts to use the new API.
Here is a short list of the most encountered type changes :
Previous: | New: |
---|---|
UnityEditorInternal.BlendTree | UnityEditor.Animations.BlendTree |
UnityEditorInternal.AnimatorController | UnityEditor.Animations.AnimatorController |
UnityEditorInternal.StateMachine | UnityEditor.Animations.AnimatorStateMachine |
UnityEditorInternal.State | UnityEditor.Animations.AnimatorState |
UnityEditorInternal.AnimatorControllerLayer | UnityEditor.Animations.AnimatorControllerLayer |
UnityEditorInternal.AnimatorControllerParameter | UnityEditor.Animations.AnimatorControllerParameter |
Also note that most accessor functions have been changed to arrays:
UnityEditorInternal.AnimatorControllerLayer layer = animatorController.GetLayer(index);
becomes:
UnityEditor.Animations.AnimatorControllerLayer layer = animatorController.layers[index];
A basic example of API usage is given at the end of this blog post: http://blogs.unity3d.com/2014/06/26/shiny-new-animation-features-in-unity–5–0/
For more details refer the the Scripting API documentation.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Is something described here not working as you expect it to? It might be a Known Issue. Please check with the Issue Tracker at issuetracker.unity3d.com.
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information