Search Issue Tracker
By Design
Votes
1
Found in
6000.0.41f1
6000.1.0b9
6000.2.0a6
Issue ID
UUM-98754
Regression
No
“A BatchDrawCommand was submitted with an invalid Batch, Mesh, or Material ID…” errors when calling BatchRendererGroup.RemoveBatch()
Reproduction steps:
1. Open the attached “BRGRemoveBatchSample“ project
2. Open the “Assets/Scenes/SampleScene” Scene
3. Enter Play Mode
4. In the Game View, press the button in the center
5. Observe the Console
Expected result: No errors are logged in the Console
Actual result: Multiple “A BatchDrawCommand was submitted with an invalid Batch, Mesh, or Material ID…” errors are logged
Reproducible with: 6000.0.41f1, 6000.1.0b9, 6000.2.0a6
Couldn't test with: 2022.3.59f1 (Compilation errors due to missing scripting APIs)
Reproducible on: macOS Sequoia 15.3.1 (M1 Max), Windows 11
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
- UI Builder can't set a background image to a sprite from a multi-sprite spritesheet in the Resources folder
- Light2D freeform does not render the internal part when rendered in certain shapes
- Using AddCopyPass causes an incorrect merging of passes.
- Negative Enum value is not pasted correctly when copying from another array
- Silent Crash when generating Lightmap UVs for a model with a large object scale
Resolution Note:
The issue is in the sample code. The problem isn't the "removeBatch" but the fact batchID.value is set to 0 and we still try to render a drawcommand using batchID at 0 in OnPerformCulling. ( so you get the valid error message)
A fix would be to test if batchId==0 in OnPerformCulling and not issuing any DrawCommand in this case.