0
0
Unityframework~5 mins

Animation events in Unity - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is an Animation Event in Unity?
An Animation Event is a way to call a function at a specific time during an animation clip. It helps trigger code actions exactly when an animation reaches a certain frame.
Click to reveal answer
beginner
How do you add an Animation Event to an animation clip in Unity?
You open the Animation window, select the animation clip, move the timeline cursor to the desired frame, and click the 'Add Event' button. Then you choose the function to call.
Click to reveal answer
intermediate
What kind of functions can be called by Animation Events?
Functions must be public, belong to the animated GameObject or its children, and can have zero or one parameter of type float, int, string, or object reference.
Click to reveal answer
intermediate
Why use Animation Events instead of checking animation time in Update()?
Animation Events trigger code exactly at the right moment without extra checks every frame, making the code cleaner and more efficient.
Click to reveal answer
beginner
Can Animation Events pass parameters? If yes, what types?
Yes, Animation Events can pass one parameter of type float, int, string, or an object reference to the called function.
Click to reveal answer
What is the main purpose of an Animation Event in Unity?
ATo pause the animation
BTo change the animation speed
CTo blend two animations
DTo call a function at a specific time during an animation
Where do you add Animation Events in Unity?
AIn the Animation window timeline
BIn the Inspector of the GameObject
CIn the Project window
DIn the Console window
Which of these parameter types can NOT be passed by an Animation Event?
Afloat
Bstring
Cbool
Dint
What must be true about the function called by an Animation Event?
AIt must be private
BIt must be public and belong to the animated GameObject or its children
CIt must return a value
DIt must be static
Why might you prefer Animation Events over checking animation time in Update()?
AThey are more efficient and trigger exactly when needed
BThey allow faster animation playback
CThey automatically pause the animation
DThey change the animation clip
Explain how to add and use an Animation Event in Unity.
Think about the steps you take in the Animation window to trigger code during animation.
You got /5 concepts.
    Describe the requirements for a function to be called by an Animation Event.
    Consider function visibility, location, and parameter rules.
    You got /4 concepts.