1. 程式人生 > >高通ar 匯出android apk報錯 Assets/Vuforia/Scripts/Utilities/VRIntegrationHelper.cs(99,29): error CS1061

高通ar 匯出android apk報錯 Assets/Vuforia/Scripts/Utilities/VRIntegrationHelper.cs(99,29): error CS1061

問題:(錯誤在VRIntegrationHelper.cs指令碼中)
error CS1061: Type UnityEngine.Camera' does not contain a definition forSetStereoProjectionMatrices’ and no extension method SetStereoProjectionMatrices' of typeUnityEngine.Camera’ could be found. Are you missing an assembly reference?
解決方法 (使用SetStereoProjectionMatrix替代SetStereoProjectionMatrices):
雙擊錯誤進去指令碼 ,原來的程式碼:
mLeftCamera.SetStereoProjectionMatrices(mLeftCamera.projectionMatrix, mRightCamera.projectionMatrix);
mRightCamera.SetStereoProjectionMatrices(mLeftCamera.projectionMatrix, mRightCamera.projectionMatrix);
修改後的程式碼:
mLeftCamera.SetStereoProjectionMatrix(Camera.StereoscopicEye.Left, mRightCamera.projectionMatrix);
mRightCamera.SetStereoProjectionMatrix(Camera.StereoscopicEye.Right, mRightCamera.projectionMatrix);