Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Importing a VFX from a package randomly break some of its properties

Discussion in 'Visual Effect Graph' started by Alesk, Oct 8, 2021.

  1. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    339
    Hi,

    I've made a unitypackage of a project and imported it in a new clean unity project.

    Once imported, one of my VFX Graphs isn't working properly and some of its properties are grayed out :

    upload_2021-10-8_9-57-3.png

    "Steam" and "Steam Shading" are grayed, and not used properly by the VFX anymore.
    They are not grayed in my original project.

    I've tried to recompile the graph, checked the versions of the packages, close/reopen the project... nothing works :/

    What's wrong here ? Any help would be greatly appreciated :)
     
  2. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    550
    Hey @Alesk ,

    What version did you upgrade from/to? Blackboard properties are grayed out when they are not used in the graph (i.e. not connected to your system). Did some connections actively break?

    And have you confirmed that the new Unity project has the Visual Effect Graph package installed in the package manager, and is running one of the Scriptable Render Pipelines? (HDRP or URP)
     
  3. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    339
    Hi @VladVNeykov !

    Yes I've confirmed all of this before importing :
    Unity 2020.3.15f2
    URP 10.5.1
    Shader Graph 10.5.1
    Visual Effect Graph 10.5.1

    And I've found the source of the problem, and this is still a bug :

    You are right, some connexions were broken, that's why the properties were grayed.
    These properties were linked to the inputs of the VFX Shader Graph referenced in the output block of my VFX graph.

    To get it imported properly I had to do these steps :

    - import my custom package
    - open the VFX Shader Graph asset and save it directly. This action save the shader and automatically recompile the VFX Graph refering to it... and only then the connexions are preserved.

    If I open the VFX Graph first or try to recompile it, the links to the shader are lost... The shader has to be processed first.

    I suggest that your team add the automatic recompilation of these shaders as soon as they are imported from a unity package ;)

    I'll try to provide a demo package less convoluted than my current project to reproduce this problem.
     
    Last edited: Oct 9, 2021