Search Unity

Question The effect only starts playing when I see it

Discussion in 'Visual Effect Graph' started by DREBOTgamestudio, Jul 27, 2020.

  1. DREBOTgamestudio

    DREBOTgamestudio

    Joined:
    Jan 30, 2018
    Posts:
    66
    The effect only starts playing when I see it. This is probably very easy to fix, but I haven't found a solution.
    In other words, I would like to approach an effect that is already working. But if I've seen this effect before, it works as expected.
     
  2. PaulDemeulenaere

    PaulDemeulenaere

    Unity Technologies

    Joined:
    Sep 29, 2016
    Posts:
    154
    DREBOTgamestudio likes this.
  3. DREBOTgamestudio

    DREBOTgamestudio

    Joined:
    Jan 30, 2018
    Posts:
    66
    It works. Thank you so much :)
    Performance question. How resource intensive is it?
     
  4. PaulDemeulenaere

    PaulDemeulenaere

    Unity Technologies

    Joined:
    Sep 29, 2016
    Posts:
    154
    It isn't negligible : it will process the update of the visual effect component even if the bound is out of the frustum, it's comparable to activate the "Update When Offscreen" on Skinned Mesh Renderer, in some isolated cases, it's really what you want.

    If you are looking for an initial state where the system has been "filled" with some particles, maybe you could consider to use the Prewarm settings in VisualEffectAsset.

    upload_2020-7-31_15-3-16.png

    It will simply process a few frames (assuming you kept the "PreWarm Step Count" to a small value) before the first rendering, it's appropriate if you are doing a simple fire effect for instance.
     
    DREBOTgamestudio likes this.
  5. DREBOTgamestudio

    DREBOTgamestudio

    Joined:
    Jan 30, 2018
    Posts:
    66
    This is exactly what I wanted, thanks)