Hi, for some reason, I canno’t destroy a sphere, because I tried to use the function “Destroy” and the Sphere still remains on screen.
This is my function:
private void CheckLife()
{
for (int i = 0; i < Particles.Count; i++)
{
Particle a;
a = (Particle)Particles[i];
a.life -= a.fade; // Reduce Particles Life By 'Fade'
if (a.life < 0.0f) // If Particle Is Burned Out
{
Particles.RemoveAt(i);
Destroy(a);
}
}
}
Particle is a Script that is attached to a GameObject sphere.
What I’m not doing well?
Greetings