cancel
Showing results for 
Search instead for 
Did you mean: 

Avatar SDK 20.1 and Unity 2022 LTS Feedback

ronjart
Explorer

I just updated my project to Unity 2022 LTS. I started getting errors in the OvrAvatarPrimitive class around vertex buffer size miss-matches. I added a line to that class setting the vertex buffer parameters one more time right before the line that would give me the error which fixed my issues:

  //added this - the bug as that the mesh vertex buffer did not match the size of the data being set in the next code line
                mesh.SetVertexBufferParams(vertexBuffer.vertexCount, vertexBuffer.vertexLayout.ToArray());
                //
       
                // Upload vertex data to the mesh.
                mesh.SetVertexBufferData(vertexBuffer.vertices, 0, 0,
                    vertexBuffer.vertexCount * vertexBuffer.vertexStride, VF_STREAM_ID);
                mesh.UploadMeshData(true);

Could be an isolated/project specific issue, but I thought I'd share if someone else is having problem.

0 REPLIES 0