0
0
Unityframework~10 mins

Sub-emitters 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 add a sub-emitter to the main particle system.

Unity
var subEmitter = mainParticleSystem.subEmitters.[1]();
Drag options to blanks, or click blank then click option'
ANewSubEmitter
BCreateSubEmitter
CAddSubEmitter
DMakeSubEmitter
Attempts:
3 left
💡 Hint
Common Mistakes
Using a method name that does not exist like CreateSubEmitter.
Trying to instantiate sub-emitters directly without using the provided method.
2fill in blank
medium

Complete the code to set the sub-emitter type to 'Birth'.

Unity
subEmitter.subEmitterType = ParticleSystemSubEmitterType.[1];
Drag options to blanks, or click blank then click option'
ADeath
BBirth
CCollision
DTrigger
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'Death' with 'Birth' as the sub-emitter trigger.
Using a type that does not exist in the enum.
3fill in blank
hard

Fix the error in the code to correctly access the sub-emitters count.

Unity
int count = mainParticleSystem.subEmitters.[1];
Drag options to blanks, or click blank then click option'
ACount
Bcount
CLength
DsubEmittersCount
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Length' which is not a property of subEmitters.
Using lowercase 'count' which is not defined.
4fill in blank
hard

Fill both blanks to correctly get the sub-emitter at index 0 and enable it.

Unity
var subEmitter = mainParticleSystem.subEmitters.[1](0);
subEmitter.[2] = true;
Drag options to blanks, or click blank then click option'
AGetSubEmitterSystem
Benabled
CSetSubEmitterSystem
DisActive
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'SetSubEmitterSystem' which does not exist.
Using 'isActive' instead of 'enabled' to enable the system.
5fill in blank
hard

Fill all three blanks to create a sub-emitter triggered on particle death with a specific particle system.

Unity
mainParticleSystem.subEmitters.[1](deathParticleSystem, ParticleSystemSubEmitterType.[2], [3]);
Drag options to blanks, or click blank then click option'
AAddSubEmitter
BDeath
CEmitterProperties.InheritColor
DBirth
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Birth' instead of 'Death' for the trigger type.
Passing incorrect properties instead of 'EmitterProperties.InheritColor'.