06-05-2019 11:11 PM
protected void UpdateSkinnedMesh(OvrAvatar avatar, Transform[] bones, ovrAvatarTransform localTransform, ovrAvatarVisibilityFlags visibilityMask, IntPtr renderPart)
....
////i added this top rule:
if (blendShapeFailCount<5 && blendParams.blendShapeParamCount > mesh.sharedMesh.blendShapeCount)
{
Debug.Log("blendShapeFailCount:"+ blendShapeFailCount);
blendShapeFailCount++;
}
else if(blendShapeFailCount<5){
for (uint i = 0; i < blendParams.blendShapeParamCount; i++)
{
float value = blendParams.blendShapeParams;
mesh.SetBlendShapeWeight((int)i, value * 100.0f);
}
}
One of my users haven't set their avatar, and this was throwing non stop out of bounds exceptions into the logs. Seems like a typo, but if i<bones.length, the sub block shouldn't ever be entered. Array index (1) is out of bounds (size=0)
OvrAvatarRenderComponent:UpdateSkinnedMesh(OvrAvatar, Transform[], ovrAvatarTransform, ovrAvatarVisibilityFlags, IntPtr)
OvrAvatarSkinnedMeshRenderComponent:UpdateSkinnedMeshRender(OvrAvatarComponent, OvrAvatar, IntPtr)
OvrAvatarComponent:UpdateAvatar(ovrAvatarComponent, OvrAvatar)
OvrAvatar:UpdateAvatarComponent(ovrAvatarComponent)
OvrAvatar:UpdateSDKAvatarUnityState()
OvrAvatar:Update()
OvrAvatarMaterialManager
.. public void ValidateTextures()
A fresh oculus SDK install in unity for mobile is throwing error from here. We fixed it by adding a return statement immediately the function header. Nothing seems to break when i do that, but avatar doesn't work when I don't. 06-12-2019 07:12 PM
06-13-2019 10:44 PM