How can I properly play the particle system component, which is attached to a GameObject? I also attached the following script to my GameObject but the Particle System does not play. How do I fix this?
public Transform gameobject1;
public Transform gameobject2;
public ParticleSystem particules;
void Start()
{
float distance = Vector3.Distance(gameobject1.position, gameobject2.position);
}
void Update()
{
if(distance == 20)
{
particules.Play();
}
}