This tutorial shows you how to integrat the Cardboard SDK AND Oculus SDK into a unique Unity project.
The maining is to build a project for each platform with minimum changes.
First, integrate the Carboard SDK following the online tutorial
Once you make it works, all you have to do is being able to disable it using this snippet code :
Cardboard.SDK.VRModeEnabled = true;
// Don't forget to recenter the view
Recenter();
// Dont forget to deactivate the Rotaction and Position tacking
_cardboardHead.trackRotation = true;
_cardboardHead.trackPosition = true;
public void Awake()
{
#if !UNITY_ANDROID
Is3DMode = false;
#else
Is3DActivable = true;
#endif
}
Once this is done, your simple switch code will do the job.
As simple !
Have an example of use with Asteroids VR
Leave a Reply