Search Unity

Question how to add multiple VFX graph effects without multiple GameObjects

Discussion in 'Entity Component System' started by Ashkan_gc, Sep 15, 2020.

  1. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    1,124
    I want to add many effects for all of my magic explosions and I have multiple thousands of them. I don't want to use one GO per entity. Is recording all positions and number of explosions I want in a texture in a burst job and sending it to VFX graph my only option or there is anything easier to do?
     
  2. Srokaaa

    Srokaaa

    Joined:
    Sep 18, 2018
    Posts:
    169
    I went with second option and its working nice for me. Mind that it requires you to use GPU Events in VFXGraph wich are currently marked as "Experimental". If you want I can send you my implementation, including the VFXGraph :)

    EDIT: Attached the files
     

    Attached Files:

    Last edited: Sep 15, 2020
    florianhanke likes this.
  3. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    1,124
    @Srokaaa I don't know how to thank you! We are in pre-production and you saved a few days of my time. I guess the post I saw regarding this was yours as well (not fully sure).
    If I did anything useful like optimizations or ... will send them back. I also have written other general systems and am doing utility AI If you need anything, let me know and I might be able to give back
     
  4. Srokaaa

    Srokaaa

    Joined:
    Sep 18, 2018
    Posts:
    169
    @Ashkan_gc No problem. Just send me a name of the game after it's finished so I can see how well it worked :)
     
  5. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    1,124
    Thanks again.