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
Comments (1)
-
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
- Channel remapping dropdown in the Terrain Layer does not open when clicked on the title
- The Editor freezes indefinitely when a large number of elements are entered in the Subgraphs or Categories lists
- Some Visual Effects package Assets links to documentation are not working
- Heatmap asset’s documentation button in the Inspector window leads to “Sorry... that page seems to be missing!” page when clicked
- Crash on MonoBehaviour::CallMethodIfAvailable when performing various actions
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.