UIPlay Animation can be created using the Unity3d built-in Animation manager to make some hidden or
The displayed menu can also be implemented using NGUI's Tween animation.
UIPlay Animation: NGUI playback Animation component
A. Create a 2d UI in the Widget Tool.
B. Create a Panel under the UI Root to load the sub menu that needs to be played with an animation.
C. Add an Animation untiy3d component to the Panel.
D. Create an Animation clip in the Animation window, adjust it, and load it to the Panel.
E. Create a UIButton and add a UIPlay Animation component to UIButton.
Animator: animation controller, used in complex animation interfaces, similar to human skeleton Animation
Animation: Specifies the object for playing an Animation. (The ngui component of the Unity3d Animation component has been used)
State Name: Name of the animation status (code can be controlled)
Trigger condition: animation Trigger condition
Play direction: the playback direction of the animation. Forward (Forward, normal playback), Revert (reverse), and Toggle (COMPACT)
Selected object: Selected object
If disabled on start: If the video cannot be played at the beginning
If already playing: If the video is already playing, Continue and execute the code. Start From Beginning and play the video From the Beginning.
When Finished: Specifies whether to disable the activation status after the animation is played.
On Finished: Event distribution when the animation is complete
In this way, when we click UIButton, we can play the animation.
UITween
NGUI, with a lot of built-in supplementary animation content
Alpha, transparency
Color, Color gradient
Width: the Width of the object.
Height, object Height
Position, Object Location change
Rotation, rotating object attributes
Scale, scaling Object Attributes
Transform, location change
Volume, whether to play the sound
Field of View: Field of View
Orthographic Size, orthogonal Size
Use of Tween animation
A. Add the Tween component to the object to be added, and add the UIPlay Tween component to the event where an animation is to be played.
UIPlay Tween:
Tween Target: the object that triggers the Tween animation.
Include Children: includes all components under the parent component
Tween Group: Group for playing the Tween animation
Trigger condition: Trigger condition
Play direction: Playing direction, Toggle, can be used to Play
If target is disabled: If the target is not activated
If already playing: If playing
When finished: whether to set to inactivable When the animation is complete
On Finished: Event distribution when the animation is complete
Tip: the animation can also be added to the light to produce different colors, with the UI