Search Issue Tracker
By Design
Votes
1
Found in
2021.3.38f1
2022.3.27f1
6000.0.1f1
Issue ID
UUM-71812
Regression
No
No particles are rendered when Renderer.material.SetColor method is used with a Visual Effect renderer
How to reproduce:
1. Open the “Test VFX Graph Bug“ project
2. Open the “VfxBug“ scene
3. Enter the Play Mode
4. Open the “TestVfx.vfx“ asset
5. In the Game view click on the “Spawn“ button
6. In the Game view click on the “Set Render Color“ button and then on the “Send Event OnPlay“ button
7. Observe the Console and Game view windows
Expected result: Particles are visible in the Game view and the “Event received“ message is logged in the Console
Actual result: No particles are visible in the Game view but the “Event received“ message is logged in the Console
Reproducible with: 2021.3.38f1, 2022.3.27f1, 6000.0.1f1
Reproducible on: macOS 13.5.2 (Intel), Windows 10 (User)
Not reproducible on: No other environments tested
Notes:
- You can also observe that the live particles are increased and decreased by opening the VFX Control panel with the “TestVfx (Clone)“ GameObject in the Play Mode with Debug Modes set to Alive, but the particles are still not rendered
- The issue is caused by “renderer.material.SetColor(_materialProperty, _color);” code snippet when the Renderer is taken from VisualEffect
- Reproducible in Player
-
Deive_Ex
May 27, 2024 14:30
Even if this is by design, I believe there should at least be a warning when modifying the Visual Effect Graph's material like that. The VFX Renderer component is a hidden component, which makes it very hard to track why modifiying the material makes this happen.
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
- Scene view audio toggle doesn't work after disabling and enabling audio source component with audio random container
- Pitch changes while paused messes up scheduling of the audio random container
- Crash on detail::ComputeShaderSnippetKey when entering the Play mode
- Unable to interact with Material Inspector window when creating a new Material and renaming it
- Shadow artifact is cast onto GameObjects in the Scene view when the Scene view lighting is disabled
Resolution Note:
This is expected. Materials in VisualEffects are owned by the effect and must stay that way.
By calling Renderer.material you are creating a copy which is outside the control of VFX graph.