cancel
Showing results for 
Search instead for 
Did you mean: 

Exceptions caused by players with old avatars

owenwp
Expert Protege
In the latest preview, for some users who have not used Oculus in a long time, OvrAvatarRenderComponent spams this exception every frame:
Array Index (28) is out of bounds (size=0)

From this line:
mesh.SetBlendShapeWeight((int)i, value * 100.0f);

It is due to mismatches in the number of blend shapes in the blendParams and the mesh itself. Changing the for loop to this works around the issue by at least preventing errors:
for (uint i = 0; i < blendParams.blendShapeParamCount && i < mesh.sharedMesh.blendShapeCount; i++)
0 REPLIES 0