0
0
Unityframework~10 mins

Animation clips in Unity - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to declare an AnimationClip variable named clip.

Unity
AnimationClip [1];
Drag options to blanks, or click blank then click option'
AclipAnimation
Banimation
CanimClip
Dclip
Attempts:
3 left
💡 Hint
Common Mistakes
Using a variable name that is not descriptive or confusing.
2fill in blank
medium

Complete the code to create a new AnimationClip instance.

Unity
AnimationClip clip = new [1]();
Drag options to blanks, or click blank then click option'
AAnimatorClip
BAnimationClip
CClipAnimation
DAnimation
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect class names like Animation or AnimatorClip.
3fill in blank
medium

Fix the error in the code to assign the clip to the Animation component.

Unity
animation.[1] = clip;
Drag options to blanks, or click blank then click option'
AruntimeAnimatorController
BanimationClip
Cclip
Danimation
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing with Animator properties like runtimeAnimatorController.
4fill in blank
hard

Fill both blanks to create a dictionary mapping animation names to clips.

Unity
var clips = new Dictionary<string, AnimationClip> { {"Run", [1], {"Jump", [2] };
Drag options to blanks, or click blank then click option'
ArunClip
BjumpClip
CwalkClip
DidleClip
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up clip variable names with animation names.
5fill in blank
hard

Fill all three blanks to create an AnimationClip, set its frame rate, and add a curve.

Unity
AnimationClip [1] = new AnimationClip();
[1].frameRate = [2]f;
[1].SetCurve("", typeof(Transform), "localPosition.x", [3]);
Drag options to blanks, or click blank then click option'
Aclip
B30
CanimationCurve
DclipAnimation
Attempts:
3 left
💡 Hint
Common Mistakes
Using inconsistent variable names or wrong frame rate values.