Search Unity

Bug Setting vertexBufferTarget on a mesh breaks in build but not editor

Discussion in 'Universal Render Pipeline' started by burningmime, Nov 2, 2021.

  1. burningmime

    burningmime

    Joined:
    Jan 25, 2014
    Posts:
    845
    (EDIT: tracked it down to an issue with this:

    Code (CSharp):
    1. mesh.vertexBufferTarget |= GraphicsBuffer.Target.Raw;
    2. 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)
     

    Attached Files:

    Last edited: Nov 2, 2021
  2. Harryh_h

    Harryh_h

    Joined:
    May 12, 2018
    Posts:
    4
    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.