I have the exact code in there but it always goes into the root.
public class PowerNode : MonoBehaviour {
[SerializeField] GameObject deathFX;
[SerializeField] Transform parent;
// Use this for initialization
void Start () {
}
void OnParticleCollision(GameObject other)
{
GameObject fx = Instantiate(deathFX, transform.position, Quaternion.identity);
fx.transform.parent = parent;
Destroy(gameObject);
}
// Update is called once per frame
void Update () {
}
The power nodes are getting destroyed, but they deathFX never gets sucked up into the empty object transform as expected.