(6) New Features of Unity5.0 ------ new animation function, unity5.0 ------
New animation feature in unity 5.0
Here is a quick overview of new animation functions you can expect!
State Machine Behaviours State Machine Behavior
In Unity 5, you can add the StateMachineBehaviour script to your states. When played is in the state, you can receive callbacks:
• OnStateEnter
• OnStateUpdate
• OnStateExit
• OnStateMove
• OnStateIK
In your status, you can create as many StateMachineBehaviours as possible. To add the IK status or customize the logic, you only need to drag it to its StateMachineBehaviour script.
Basically, in your game, there is any need for a certain state machine logic-this state machine behavior can be used for animation with or without animation.
Another great thing about this feature isthat you don't need to have tons
Another benefit of this function is that you do not need to have a large number
If (animator. GetCurrentAnimatorStateInfo (0). isName ("Idle "))
DoStuff ()
(And I'm sure you have enough code in your code ),
Instead, you can only use StateMachineBehaviours!
State Machine Transitions State Machine Conversion
State Machines State Machine becomes more and more complex, so we introduced the State Machine Transitions State Machine transformation State Machine logic to provide high-level abstract concepts.
In Unity 5, we have added their (Entryand Exit) entry and Exit nodes to StateMachines. Use State Machine Transitions ).
Entry: When you switch to the StateMachine state machine, the animation system evaluates whether the (Entrynode) node and (branch) branch meet the criteria.
Exit: When you Exit node, the animation system will check that the output StateMachine state machine transformation and branch have reached the appropriate destination.
Note that you can mix transitions: State-> State, State-> StateMachine, StateMachine-> StateMachine...
Please note that you can use both transitions for transition: State-> State, State-> StateMachine, StateMachine-> StateMachine...
More importantly, unity also modifies the UI, so now you can refactor your parameter parameters and layer layers.
Asset Creation API
In Unity 5, you can create assets for animation; StateMachines, States, Controllers, Layers, Blentrees, etc. use scripts in the Editor!
There are two APIs, one (high-level) high-level assets managed by Unity, and one (lowlevel) low level where you need to manually manage assets and execute external references.
Both APIs have ented, and there is a small example of Api use at the end of this article.
Direct Blend Trees Direct hybrid tree
We have added a new BlendTree that allows you to map directly to the Animation Parameters of BlendTree child weight.
This can be used if you are using BlendShape animation or adding an animation.
Root Motion Authoring (in generic mode) Root Motion creation (in normal mode)
Unity 5 also allows you to animated objects and convert them to root motion (Delta Animation ). Create an animation-translation/rotation-top-level object transformation, and click Generate Root Motion Curve (Generate Root Motion Curve) on the inspector Panel of the AnimationClip )!
More things make your life easier:
• Improved animation preview camera. The camera now supports Pan translation, Orbit orbital, and Scale as the scene viewer in the same way.
• Runtime access parameters (name, default values, etc .)
• Gizmo's root location and ik location in the scene scenario View
• Improved (retargeting engine) redirection engine
• Runtime Optimization
• Tons and tons bug fixes
Official: http://blogs.unity3d.com/2014/06/26/shiny-new-animation-features-in-unity-5-0/