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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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.