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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
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.