用Unity3D制作一个简单AR所遇到的问题


问题:(错误在VRIntegrationHelper.cs脚本中)

 error CS1061: Type `UnityEngine.Camera' does not contain a definition for `SetStereoProjectionMatrices' and no extension method `SetStereoProjectionMatrices' of type `UnityEngine.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);


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM