Search Issue Tracker
By Design
Votes
1
Found in
2021.3.38f1
2022.3.30f1
6000.0.3f1
6000.1.0a7
6000.2.0a1
Issue ID
UUM-72435
Regression
No
Mesh is not rendered in the Player when using mesh.indexBufferTarget and mesh.vertexBufferTarget
How to reproduce:
1. Open the user-attached project “UnityCrashMay24”
2. Build and Run the “SampleScene” scene
3. Observe the Player
Expected results: There is a Mesh rendered in the Player
Actual results: There is nothing rendered in the Player
Reproducible with: 2021.3.38f1, 2022.3.30f1, 6000.0.3f1
Reproducible on: Windows 11 Pro
Not reproducible on: No other environment tested
Note: Not reproducible in Editor
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
- Query Builder items display raw code style names instead of human readable labels in search field
- “+” button does nothing and has no functionality when clicked in Human Template "Bone Template" list
- Solid gray or black areas are present when using ShaderGraph with Custom Function nodes without manual reimport
- The Multiplayer Play mode tool doesn't see the list of Play Mode scenarios when using 6000.3.x
- Input field does not update when selecting the same input field after previous input was canceled
Resolution Note:
This behavior is currently by design. Recreating mesh buffers with a different target requires the underlying mesh data to be present on the CPU.
When the mesh.vertexBufferTarget or mesh.indexBufferTarget is changed to a new target, the current mesh buffers are destroyed. The buffers are then recreated with the updated target, and the data is repopulated from the CPU.
In the Player, the CPU-side data for the Mesh "TestMeshVertexColor" is not retained. To preserve the data, you can enable the "Read/Write" option in the mesh's importer settings, which would result in the expected behavior. By contrast, in the Editor, CPU mesh data is always available regardless of this setting. This explains the observed difference in behavior between the Player and the Editor.
I’m closing this ticket as "By Design." However, I’ve submitted additional tickets to ensure that this behavior is clearly documented. Please file a feature request if you'd like to see functionality to unlock this API without requiring CPU data.
Resolution Note:
This behavior is currently by design. Recreating mesh buffers with a different target requires the underlying mesh data to be present on the CPU.
When the mesh.vertexBufferTarget or mesh.indexBufferTarget is changed to a new target, the current mesh buffers are destroyed. The buffers are then recreated with the updated target, and the data is repopulated from the CPU.
In the Player, the CPU-side data for the Mesh "TestMeshVertexColor" is not retained. To preserve the data, you can enable the "Read/Write" option in the mesh's importer settings, which would result in the expected behavior. By contrast, in the Editor, CPU mesh data is always available regardless of this setting. This explains the observed difference in behavior between the Player and the Editor.
I’m closing this ticket as "By Design." However, I’ve submitted additional tickets to ensure that this behavior is clearly documented. Please file a feature request if you'd like to see functionality to unlock this API without requiring CPU data.