Hi, I’m trying somethings on my game by my own like including a particle explosion when an enemy is destroyed.
I sucefully included the particle system on my game and it does show on the Hierarchy, but it seens to be invisible on the playspace.
Actually it only happens when I attach the position of the particle system to the enemy I destroyed. (i.e., on the Instantiate method if I only writhe (Instatiate (explosion)), it works fine, but the explosion will always appear on the same place. If I put Instantiate(explosion, transform.position, transform.rotation); [like this:]
public class Col : MonoBehaviour {
public GameObject explosion;
void OnCollisionEnter2D(Collision2D collider)
{
Instantiate(explosion, transform.position, transform.rotation);
GameObject.Destroy(gameObject);
GameObject.Destroy(collider.gameObject);
It appears on the hierarchy but not on the playscene (it stays invisible).
My Project file:
thank you