Search Unity

Question Performance drop when VFX first initialized

Discussion in 'Visual Effect Graph' started by FOXAcemond, Nov 28, 2020.

  1. FOXAcemond

    FOXAcemond

    Joined:
    Jan 23, 2015
    Posts:
    99
    Hello,

    For some reason I'm experiencing a big lag (~1/2 sec) when my VFX Graphs show for the first time in-game.
    This is pretty weird and only happens the first time they are (seemingly) loaded into memory (I'm guessing GPU's). I'm saying that because it doesn't happen if I unload the scene and reload it agian, only if I reboot the game (or editor).

    Is anybody else experiencing this issue?

    The graph is not particularly complicated, 11 nodes at most. And it only appears 3/4 times on screen. They are already present in the scene, nothing fancy just set to
    .enabled = false
    and then
    .enabled = true
    when they should start. I tried to change the culling flags but it didn't change this issue, the lag spike just didn't happen at the same moment, but would still occur.
     
    Last edited: Nov 28, 2020
  2. FOXAcemond

    FOXAcemond

    Joined:
    Jan 23, 2015
    Posts:
    99
    I'm on HDRP 10.2 and Unity 2020.2.0b13, is that why this is happening?