Hello,
I wrote this simple script to emit particles while I’m overlapping a trigger. It does work, however if I touch trigger for really short period of time (like touch it, wait 0.1 sec and leave it) it completly messes up and doesn’t work at all until I restart the game.
public class ParticleControll : MonoBehaviour
{
public Transform part1;
void Start()
{
part1.GetComponent<ParticleSystem>().enableEmission = false;
}
void OnTriggerEnter2D()
{
part1.GetComponent<ParticleSystem>().enableEmission = true;
}
void OnTriggerExit2D()
{
part1.GetComponent<ParticleSystem>().enableEmission = false;
}
}
Particle menu shows that emition is enabled but It doesn’t emit particles after I do thing mentioned above.