Unity Issue Tracker - Sprite Renderer not rendering duplicated GameObject grey when using MaterialPropertyBlock
Closed
UUM-64587
Sprite Renderer not rendering duplicated GameObject grey when using MaterialPropertyBlock
Unity: 2D
As Designed
2023.3.X
2023.2.X
2022.3.X
2021.3.X
If different set of values are set in the MaterialPropertyBlock, it will break batching even if the same object is being to call SetPropertyBlock. This is By Design.
Reproduction steps:
1. Open the “TempProject.zip”
2. Open the Frame Debugger window (Window > Analysis > Frame Debugger)
3. Enter Play mode and Enable the Frame Debugger
4. Observe the Game window of the 3rd frame and Draw Dynamic event in the Frame Debugger window (Camera.Render > Drawing > Render.TransparentGeometry > RenderForward.RenderLoopJob > Draw Dynamic)
Expected result: Both trees are rendered gray and there’s nothing of note in the Frame Debugger window
Actual result: Only one of the trees is rendered gray and “Why this draw call can’t be batched with the previous one
Objects have different MaterialPropertyBlock set.” message is shown in the Frame Debugger window