Search Unity

Destroy the gameobject once the effect has played? sounds simple but....how?!

Discussion in 'Visual Effect Graph' started by RR7, Sep 17, 2020.

  1. RR7

    RR7

    Joined:
    Jan 9, 2017
    Posts:
    254
    So i have a prefabbed Visual effect, two objects collide the effect prefab is created at the location, the VFX plays once as intended, and then stops again as intended, or at least appears to.

    so now the gameobject is just setting there with nothing going on. subsequently more get created.

    i'm quite sure the old particle system used to destroy the gameobject once it was done.

    this just seems so simple i'm sure i'm missing something obvious which is why i cant seem to find any info online.
     
  2. RR7

    RR7

    Joined:
    Jan 9, 2017
    Posts:
    254
    well i created a script on it that kills the gameobject if there are no active particles, and it works but it doesnt seem a good way to do this at all, and things just slow down after a while, i cant help but think this is why.