Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug VFX wont render in build or editor unless I have loaded them in the VFX graph window once

Discussion in 'Visual Effect Graph' started by DarkStoneDigital, Nov 15, 2022.

  1. DarkStoneDigital

    DarkStoneDigital

    Joined:
    Sep 9, 2018
    Posts:
    12
    I recently migrated my project over to a new computer. I've managed to get everything setup, but I noticed my VFX are not rendering in build OR in the editor unless I actually load them into the VFX graph window. Once I load them, they will work in all cases. However, I really don't want to individually load each VFX. Not sure how this is tied to builds or really anything but I'm curious if others have this issue and if there is a work around.

    I have tried re-importing my VFX files, but the issues remains unless I load them individually. I also don't receive any errors.

    I'm on 2021.2.4f1 using HDRP I plan to upgrade soon but my project is live, so I don't want to change versions until I have a new stable build out and have time to fix issues.
     
    Last edited: Nov 15, 2022
  2. Grigler_f

    Grigler_f

    Joined:
    May 14, 2020
    Posts:
    22
    We've had this problem with Visual Effect Graph package version 12.1.7 in Unity version 2021.3.5f1, this is especially annoying with CI builds as there doesn't seem to be a way to programmatically trigger the compilation of VFXGraph assets.
     
  3. DigitalChaotics

    DigitalChaotics

    Joined:
    Dec 18, 2013
    Posts:
    21
    Well, their solution in 2022.2.2f1 was to recompile the VFX graphs at random times, e.g., when you add a component to an object that has NOTHING to do with VFX graph. Or when you save the project. Oh, and I'm still not convinced it'll fix your problem.

    I'm not sure which is worse.

    - Build system produces ####
    - Build system disrupts workflow

    Hmmm... :rolleyes:
     
  4. Grigler_f

    Grigler_f

    Joined:
    May 14, 2020
    Posts:
    22
    To add to this, we've attempted to call their "Rebuild and Save All VFX Graphs" function as part of our build script. This had to be done dirtily through this line as this function is not made public,

    EditorApplication.ExecuteMenuItem("Edit/VFX/Rebuild And Save All VFX Graphs");

    Unfortunately, this did not fix the problem. So I'm confused as to what would be required.