Search Unity

Question VFX time since spawning started

Discussion in 'Visual Effect Graph' started by DanielleBBI, Jun 2, 2022.

  1. DanielleBBI

    DanielleBBI

    Joined:
    Mar 28, 2018
    Posts:
    30
    Hello,

    I have a system that is using a constant spawn rate and is getting a stop and start event from code. I want to know which time node I should be using to drive things relating to the time of the system (something in other systems will be referred to as emitter life or spawn time) relative from when it got the start event. I want to escalate the effects the longer the system is active.
    I tried using VFX time but that only works when I enable and disable the whole graph which I do not want to do. Also tried the set spawn time but that does not seem to work when using a constant spawn

    Thanks
     
  2. DanielleBBI

    DanielleBBI

    Joined:
    Mar 28, 2018
    Posts:
    30
    Forgot to mention Im on 2022.1.3f1
     
  3. Peplm

    Peplm

    Joined:
    Aug 2, 2019
    Posts:
    19
    Hello. I don't know if it's possible to reset value with event directly inside vfx graph, what i would do to achieve this is use an exposed float, trigger your event via script, so you can reset your value each time you call your event and increment it on update.
     
    Qriva likes this.