Alwin Thomas
Alwin Thomas

Reputation: 1

Error when building to Android in Unity

I have my SDK and JDK set in my preferences, I have the following errors each time I try to run it. Really not sure what the issue is. I have debugging enabled on my phone as well.

Assets/Vuforia/Scripts/Utilities/VRIntegrationHelper.cs(99,29): 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?

Error building Player because scripts had compiler errors

Build completed with a result of 'Failed'

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:182 
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:89 
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Upvotes: 0

Views: 1872

Answers (1)

cfif cfif74
cfif cfif74

Reputation: 33

You need to change the code:

mLeftCamera.SetStereoProjectionMatrices(mLeftCamera.projectionMatrix, mRightCamera.projectionMatrix);
mRightCamera.SetStereoProjectionMatrices (mLeftCamera.projectionMatrix, mRightCamera.projectionMatrix);

On that:

         

mLeftCamera.SetStereoProjectionMatrix (Camera.StereoscopicEye.Left, mRightCamera.projectionMatrix);
mRightCamera.SetStereoProjectionMatrix (Camera.StereoscopicEye.Right, mRightCamera.projectionMatrix);

Upvotes: 2

Related Questions