Search Issue Tracker

By Design

Under Consideration for 2021.3.X, 2022.3.X, 6000.0.X, 6000.1.X, 6000.2.X

Votes

1

Found in

2021.3.38f1

2022.3.30f1

6000.0.3f1

6000.1.0a7

6000.2.0a1

7000.0.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

  1. 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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.