Complete the code to add a sub-emitter to the main particle system.
var subEmitter = mainParticleSystem.subEmitters.[1]();The method AddSubEmitter() is used to add a sub-emitter to a particle system in Unity.
Complete the code to set the sub-emitter type to 'Birth'.
subEmitter.subEmitterType = ParticleSystemSubEmitterType.[1];The sub-emitter type Birth triggers the sub-emitter when a particle is born.
Fix the error in the code to correctly access the sub-emitters count.
int count = mainParticleSystem.subEmitters.[1];The correct property to get the number of sub-emitters is Count.
Fill both blanks to correctly get the sub-emitter at index 0 and enable it.
var subEmitter = mainParticleSystem.subEmitters.[1](0); subEmitter.[2] = true;
GetSubEmitterSystem(0) gets the first sub-emitter system, and setting enabled to true activates it.
Fill all three blanks to create a sub-emitter triggered on particle death with a specific particle system.
mainParticleSystem.subEmitters.[1](deathParticleSystem, ParticleSystemSubEmitterType.[2], [3]);
AddSubEmitter adds the sub-emitter, Death sets the trigger type, and EmitterProperties.InheritColor sets the sub-emitter to inherit the color from the parent particles.