Search Issue Tracker
Won't Fix
Votes
0
Found in
2022.3.57f1
6000.0.36f1
6000.1.0b4
6000.2.0a1
Issue ID
UUM-96037
Regression
No
Visual Effect Graph shader fails to render when the VFX Graph window is open during Play Mode
Reproduction steps:
1. Open the attached “repro_IN-93242“ project
2. Open the “Assets/NoSound/Scene/Demo/Demo Scene.unity“ Scene
3. Enter the Play Mode
4. Pick up one of the blue cubes (“Picked Cube Midle“ GameObject in the Hierarchy) by facing it and pressing the 'E' button
5. Aim it at the big, black, cube-form room (“Base Room“ GameObject) and throw it by pressing the left mouse button
6. Observe that a shader works when the blue cube hits the ground/wall of the black room (gray expanding circles appear)
7. Exit the Play Mode
8. Open the “Assets/vfxFog.vfx“ Visual Effect Asset and dock the “vfxFog“ window next to the Game view
9. Repeat from the 3rd to the 5th step
10. Observe the black room when the blue cube hits the ground/wall
Expected result: Shader works when the blue cube hits the ground/wall of the black room (gray expanding circles appear)
Actual result: Shader doesn’t work when the blue cube hits the ground/wall of the black room (gray expanding circles don’t appear)
Reproducible with: 2022.3.57f1, 6000.0.36f1, 6000.1.0b4, 6000.2.0a1
Reproducible on: Windows 10 (22H2), Windows 11 (23H2) (user’s environment)
Not reproducible on: No other environments tested
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "GetPreferedValue" returns max value when using auto-sizing
- UI Builder doesn't update the style sheet when using "Extract inline style" right-click option
- “Assertion failed on expression” errors thrown when undoing Nodes creation with keyboard shortcut
- Crash on various stack traces when using Texture2D.CreateExternalTexture() while rendering
- Clicking on section text in Node Library > Context folder throws NullReferenceException errors
Resolution Note:
The issue is not fully related to VFX Graph, but luckily it can be fixed on the user side.
What is going on:
- During initialization the user sets the _Size property to 30 in the echo materials.
- When VFX Graph editor is open, any domain reloading (including the one that happens on enter playmode) triggers the recompilation of the VFX opened in the editor. This is not ideal and it is being addressed, but it is not the root problem here.
- After any file has been imported (not only VFX), all materials in the scene are reset.
- The _Size uniform value was not cached because it was not declared as a property. Then it goes back to the default value (0), which results in the material not rendering any waves.
How to fix this on the user side:
- Add the _Size property to the Properties section in the shader. If the user does not want the property to be visible, they can use the HideInInspector attribute:
[HideInInspector]_Size("Size", Integer) = 0
- In EcholocationControllerV5::Init(), replace SetInt (deprecated) with SetInteger. SetInt treats the property as a float.
Both fixes are needed for the material to work as expected.