Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
ronjart's avatar
ronjart
Start Partner
2 years ago

Avatar SDK 20.1 and Unity 2022 LTS Feedback

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.

Replies have been turned off for this discussion