Unity is giving me errors about the emitter.Play = true in the following code. Says the emitter should be a variable or property or indexer. What’s going on?
void LightFire(GameObject campfire) {
ParticleSystem[] fireEmitters;
fireEmitters = campfire.GetComponentsInChildren<ParticleSystem>();
foreach(ParticleSystem emitter in fireEmitters) {
emitter.Play = true;
}
campfire.audio.Play ();
Destroy(matchGUI);
haveMatches = false;
}