Search Unity

Bug VFX invisible until opened in the inspector

Discussion in 'Visual Effect Graph' started by Telhurin, Sep 19, 2022.

  1. Telhurin

    Telhurin

    Joined:
    Feb 8, 2015
    Posts:
    18
    For some time we are struggling with a few VFX's constantly going invisible and throwing exceptions ("VFX Graph Value of name 'x' was not found) while trying to change its properties on runtime.

    We've tried rebuilding them with "Edit/Visual Effects/Rebuild and Save all Visual Effects Graph" but that does not seem to do the trick. The only way to make them visible is to open them in inspector - and that helps only until the editor is restarted. It happens only to a few effects and on a wide range of devices, both in the editor and after it was built.

    I was able to reproduce it on a clean 2020.3.10f URP project. The unity package contains a faulty Graph that will be invisible after importing it and will work only after it's been clicked twice.

    Is there anything we are missing here, some obvious defect preventing this VFX from saving correctly? Or even a hidden command to just recompile them before the build? Thank you in advance ^^!


    upload_2022-9-19_12-9-30.png upload_2022-9-19_12-10-10.png
     

    Attached Files:

    Last edited: Sep 19, 2022
  2. Telhurin

    Telhurin

    Joined:
    Feb 8, 2015
    Posts:
    18
    It's a bit rude to bump the thread, but this is still an issue with Unity 2021.3.2x and Visual Effect Graph 12.1.10. Even the simplest of effects routinely keep disappearing and must be opened in the graph editor to make them work again.
     
  3. Vita-

    Vita-

    Unity Technologies

    Joined:
    Jul 2, 2019
    Posts:
    121
    Not rude at all, thank you for bringing this up. Have you noticed any other patterns or have any information that would help to reproduce the issue from scratch (would prevent shader dependency generation)?

    I see that your VFXs do have ShaderGraph assets assigned. Have you ever reproduced the issue with VFX assets that do not have ShaderGraphs?

    If you are willing to capture your screen when the issue happens, I'd be more than happy to investigate it. You can upload it here.

    Also, reporting back what I've tried with your attached package but was not able to reproduce from scratch:
    1. Editing VFX and ShaderGraphs and then saving, recompiling them;
    2. Forced Runtime mode;
    3. Editing VFX in Play Mode;
    4. Building player and then getting back to the Editor to see if the issue occurs;
    5. Closed and then reopened the Editor;
    6. Tried upgrade and downgrade scenario (2021.3.20f1 <> 2021.3.22f1).
     
  4. Telhurin

    Telhurin

    Joined:
    Feb 8, 2015
    Posts:
    18
    Now that you mention it, that is true - all the problematic VFXs do have ShaderGraph assets assigned. I've tried to export it as a custom package, but exporting it before opening in the inspector first results in an incomplete package (bassicly without the shader graph and assets). I've uploaded a video and both packages to the drive. I will try to find all the dependencies and upload another one in a "raw" state as a regular zip.
     
  5. Vita-

    Vita-

    Unity Technologies

    Joined:
    Jul 2, 2019
    Posts:
    121
    Many thanks! I will look into the issue as soon as possible :)
     
  6. Telhurin

    Telhurin

    Joined:
    Feb 8, 2015
    Posts:
    18
    I must admit I'm no longer able to reproduce it in an empty project, so maybe it is some byproduct of upgrading a Unity version (we did it a few weeks ago). I will manually re-open all VFX and will keep an eye out if the problem occurs again.
     
  7. Vita-

    Vita-

    Unity Technologies

    Joined:
    Jul 2, 2019
    Posts:
    121
    Indeed sometimes it is quite challenging to catch reliable reproduction, I'll try to narrow down it on my end as well.

    Off topic, but if it is possible, would you be able to switch to the New Shadergraph Integration by enabling 'Support VFX Graph' and selecting one of the SRP targets in ShaderGraph's Graph Inspector? We deprecated the Visual Effect target a while ago.
    SRP-Target.gif
     
  8. Telhurin

    Telhurin

    Joined:
    Feb 8, 2015
    Posts:
    18
    Will do that, thank you ^^.
     
  9. Vita-

    Vita-

    Unity Technologies

    Joined:
    Jul 2, 2019
    Posts:
    121
    Julien-A likes this.
  10. Telhurin

    Telhurin

    Joined:
    Feb 8, 2015
    Posts:
    18
    Thank you kindly for the response, that does make sense ^^. From what I understand, the issue is not on the side of the Visual Graph, apologies for taking your time then. Cheers!
     
  11. Julien-A

    Julien-A

    Unity Technologies

    Joined:
    Jun 10, 2021
    Posts:
    15
    Hello,
    You're not taking our time, no worry!
    Actually the issue in the scope of VFX Graph and we have a fix in the work.
     
    Telhurin likes this.
  12. lgarczyn

    lgarczyn

    Joined:
    Nov 23, 2014
    Posts:
    68
    Same issue, 2022.3.4f1, caused by a missing shadergraph asset
     
  13. Vita-

    Vita-

    Unity Technologies

    Joined:
    Jul 2, 2019
    Posts:
    121
    Hi @igarachv, it is fixed in 2022.3.6f1, could you upgrade your project and see if the fix works for you?