0
0
Unityframework~20 mins

Sub-emitters in Unity - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Sub-Emitter Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
What is the output of this Unity particle system code with sub-emitters?

Consider a particle system with a sub-emitter configured to emit particles on death of the main particles. What will be the total number of particles emitted if the main system emits 5 particles and each sub-emitter emits 3 particles on death?

Unity
using UnityEngine;

public class ParticleTest : MonoBehaviour {
    public ParticleSystem mainSystem;
    public ParticleSystem subEmitter;

    void Start() {
        mainSystem.Emit(5);
    }
}
A20
B5
C15
D8
Attempts:
2 left
💡 Hint

Remember each main particle triggers the sub-emitter on death, emitting 3 particles each.

🧠 Conceptual
intermediate
1:30remaining
Which statement best describes sub-emitters in Unity?

Choose the correct description of sub-emitters in Unity's particle system.

ASub-emitters are separate particle systems that can be triggered by events in the main particle system, like birth or death of particles.
BSub-emitters are used to combine multiple particle systems into one single system permanently.
CSub-emitters automatically replace the main particle system when it finishes emitting.
DSub-emitters are only used to change the color of particles in the main system.
Attempts:
2 left
💡 Hint

Think about how sub-emitters react to particle events.

🔧 Debug
advanced
2:30remaining
Why does the sub-emitter not emit particles on collision event?

Given this setup, the sub-emitter is configured to emit on collision, but no particles appear. What is the most likely cause?

Unity
ParticleSystem subEmitter;

void Setup() {
    var subEmitters = mainSystem.subEmitters;
    subEmitters.AddSubEmitter(subEmitter, ParticleSystemSubEmitterType.Collision, ParticleSystemSubEmitterProperties.InheritNothing);
}

// mainSystem has collision module enabled with collision events enabled.
ASub-emitters cannot be triggered by collision events in Unity.
BThe main particle system's collision module is not enabled or collision events are not enabled.
CThe sub-emitter must be added before the main system starts emitting particles.
DThe sub-emitter's emission rate is set to zero.
Attempts:
2 left
💡 Hint

Check the main system's collision settings.

📝 Syntax
advanced
1:30remaining
Identify the syntax error in adding a sub-emitter in Unity C# script.

Which option contains the correct syntax to add a sub-emitter to a particle system?

Unity
var subEmitters = mainSystem.subEmitters;
subEmitters.AddSubEmitter(subEmitter, ParticleSystemSubEmitterType.Death, ParticleSystemSubEmitterProperties.InheritColor);
AsubEmitters.AddSubEmitter(subEmitter; ParticleSystemSubEmitterType.Death, ParticleSystemSubEmitterProperties.InheritColor);
BsubEmitters.AddSubEmitter(subEmitter, ParticleSystemSubEmitterType.Death ParticleSystemSubEmitterProperties.InheritColor);
CsubEmitters.AddSubEmitter(subEmitter, ParticleSystemSubEmitterType.Death, ParticleSystemSubEmitterProperties.InheritColor);
DsubEmitters.AddSubEmitter(subEmitter, ParticleSystemSubEmitterType.Death, ParticleSystemSubEmitterProperties.InheritColor
Attempts:
2 left
💡 Hint

Look carefully at commas and parentheses.

🚀 Application
expert
3:00remaining
How to create a chain reaction of sub-emitters in Unity?

You want a particle system where the main system emits particles, each of which triggers a sub-emitter on death, and that sub-emitter also triggers another sub-emitter on death. How do you set this up correctly?

AConfigure the main system to emit all particles at once and rely on gravity to create the effect.
BAdd multiple sub-emitters directly to the main system, all set to trigger on death.
CUse one sub-emitter with a very high emission rate to simulate chain reaction.
DAdd a sub-emitter to the main system, then add a sub-emitter to that sub-emitter's particle system, each set to trigger on death.
Attempts:
2 left
💡 Hint

Think about how sub-emitters can themselves have sub-emitters.