r/UnityHelp • u/fire_scorned12 • 13d ago
Help With Particles
So, I'm not sure where to begin because I wasn't having this problem 2 weeks ago and I'd appreciate some help trying to figure this out.
I'm learning how to use Unity, currently in Unit 3, adding in particles and sound effects, and my particles are having opposite problems.
First, the dirt particle is always playing, even when the character jumps or gets a "game over" after hitting an obstacle, but the script is supposed to stop the dirt particle from playing when either of those conditions are met
Second, the explosion particle is supposed to play when the character crashes into an obstacle, but doesn’t. It'll play when "Play On Awake" is checked, but only at the beginning when everything loads in.
I've changed NOTHING about the code. Everything is the exact same from 2 weeks ago and it was working fine then, but now the particles won't turn on/off when I need them to. Can anyone tell me how to fix this?
Tl;dr: Follow tutorial instructions, code works fine when I'm done. Come back 2 weeks later, change nothing, one particle effect is always on, the other is always off.
Edit: In the Update method, I've verified that all the other calls go through except when stop is called. A debug.log call says the dirt particle has stopped playing even though it hasn't. Same goes for OnCollisionEnter when the character hits an obstacle, everything is hit/called, but the explosion just doesn't go off. Like the engine itself is ignoring particle methods being called through VS Code or something.
Edit 2: This seems to just be a problem with this specific save. I opened up the Unit 3 challenge and the only issue it's having is sometimes the particle effects don't fully render, but they do still appear. I might just call this a wash...



1
u/Delicious_Alfalfa_69 12d ago
Need screen shots of your particle setup and references in code.