I am looking for a line of C# code that will play a particle effect on death. Here is my code so far. And Play() isnt working for me. If anyone has a solution please help me! (Unity 5.6)
using UnityEngine;
using System.Collections;
public class ShootableBox : MonoBehaviour {
public int currentHealth = 3;
public GameObject explosionDeath;
public void Damage(int damageAmount)
{
currentHealth -= damageAmount;
if (currentHealth <= 0)
{
gameObject.SetActive (false);
//Looking For Particle Effect here
}
}
}