I’ve had a terrible time getting my flame-thrower to work. When the item is instantiated and first activates, the particle system won’t play.
Having gone through the motions, I’ve found that the reporting from isPlaying seems completely whack. I present a public boolean isParticlesPlaying within the script and in FixedUpdate I set this boolean to whatever ParticleSystem.isPlaying is:
FixedUpdate() {
isParticlesPlaying = beamParticles.isPlaying
}
Enabling and disabling the particle system, this boolean doesn’t match whether the particle system is actually active or not. Also I can change the value in the Inspector and it’ll stick instead of being updated to the particle system’s play state. I can start the test scene, see the particles playing, and see the isParticlesPlaying tickbox checked. I can click the checkbox is disable the tick but then it’s immediately set to on as that’s what .isPlaying says. But then I can set it to off and the value stays off, even when the particle system is running and beamParticles.isPlaying should be setting it to on. Likewise, I can set the tickbox to on even when the particle system is off.
In my project proper, once I get the emitter working, a cycle of enable, disable, reenable, it seems to work properly. But this means the first use of the weapon doesn’t work and I can’t figure out how to get it to work. This isPlaying situation is making me wonder if the fault is actually with Shuriken (2019).
Edit: Okay, the above behaviour with the checkbox seems to be an Inspector thing as enabling/disabling a GO based on particleSystem.isPlaying seems correct. Sadly leaving me still confused as to why my playing and active particle systems aren’t emitting particles.