Hello, I’m relatively new to Unity and I’ve been working with particle effects (PE) in a 2D game I’m designing. I’m having trouble with singling out a specific PE to play on an object. I’ve noticed that even if I have different PE’s in different child objects, all of them play, even if I only want a specific one to play. I’m using TriggerParticles();
in the script, but is there a better way to target a specific PE?
I know that I could assign each PE to a different child object and activate/deactivate that object, but that won’t work for the situation I need it in. For example, when an enemy object is hit by the player, a damaged PE plays. But when I R-click on an enemy to talk, I only want the “talk” PE to play, not the damaged PE.
I have another problem situation where a child object is activated and a looping PE will play until that object is deactivated. However, every time the enemy is hit, the looping PE stacks on top of itself, again and again with each hit.
I’d appreciate any advice you could offer on this. Thanks!