0
0
Unityframework~10 mins

Emission and shape modules 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 enable the emission module of a ParticleSystem.

Unity
var emission = particleSystem.emission;
emission.[1] = true;
Drag options to blanks, or click blank then click option'
AplayOnAwake
BrateOverTime
Cenabled
Dshape
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'playOnAwake' which belongs to the main ParticleSystem, not emission.
Trying to set 'rateOverTime' to true, but it's a numeric value.
2fill in blank
medium

Complete the code to set the emission rate over time to 10 particles per second.

Unity
var emission = particleSystem.emission;
emission.rateOverTime = [1]f;
Drag options to blanks, or click blank then click option'
A5
B20
C0
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0 which stops emission.
Using 5 or 20 which are incorrect rates for this task.
3fill in blank
hard

Fix the error in the code to set the shape module's angle to 25 degrees.

Unity
var shape = particleSystem.[1];
shape.angle = 25f;
Drag options to blanks, or click blank then click option'
Aemission
Bshape
Crenderer
Dmain
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'emission' instead of 'shape' which does not have an angle property.
Using 'renderer' which is unrelated here.
4fill in blank
hard

Fill both blanks to set the shape module's radius to 3 and enable it.

Unity
var shape = particleSystem.[1];
shape.[2] = 3f;
Drag options to blanks, or click blank then click option'
Ashape
Bemission
Cradius
Denabled
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'emission' instead of 'shape' for the module.
Trying to set 'enabled' to 3 which is invalid.
5fill in blank
hard

Fill all three blanks to enable emission, set rate over time to 15, and set shape angle to 45.

Unity
var emission = particleSystem.emission;
emission.[1] = true;
emission.rateOverTime = [2]f;
var shape = particleSystem.[3];
shape.angle = 45f;
Drag options to blanks, or click blank then click option'
Aenabled
B15
Cshape
DrateOverTime
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'rateOverTime' as a boolean property.
Using 'emission' instead of 'shape' for the last blank.