Hi, how do I prevent the error? This is what I am doing in code:
public class FadeParticles : MonoBehaviour {
private void Update() {
FadeTheseParticles();
}
private void FadeTheseParticles() {
ParticleEmitter pEmitter = GetComponent<ParticleEmitter>( );
if (pEmitter.maxEmission > 0) {
pEmitter.maxEmission -= 20 * Time.deltaTime;
}
else
Destroy(gameObject);
}
}
Getting the error: f < 0 || f > UINT_MAX How can I prevent it? What is causing it? Are there better ways to get a smooth fade out of particles? If so, what are they?