Setting vertexBufferTarget on a mesh breaks in build but not editor

(EDIT: tracked it down to an issue with this:

mesh.vertexBufferTarget |= GraphicsBuffer.Target.Raw;
unskinnedVertices = mesh.GetVertexBuffer(0);

). On non-read/write meshes, this breaks the whole mesh rendering. Which kind of defeats the purpose of the feature, since that should allow you to access the buffers directly on the GPU, without needing them loaded on the CPU side. I will submit a bug)

7621658--947854--upload_2021-11-1_23-51-57.png
7621658--947857--upload_2021-11-1_23-52-10.png

Yep I’m getting the same thing on 2021.3.5f1, is there any way to ensure the mesh.vertexBufferTarget includes GraphicsBuffer.Target.Raw, without changing it at runtime? i.e. set it in editor and it stays true in build.

same issue on 2021.3.19 . the mesh created wirth GraphicsBuffer.Target.Structured, and mesh
GetVertexBuffer works good on Editor. But in mobile GetVertexBuffer always get Empty Buffer.