Need to document how to setup a (non-VR) "Magic Window" mode, such that the full screen monoscopic image on the device tracks the rotation of the device.
Documentation of how to transition between VR (Daydream/Cardboard) and non-VR ("Magic Window") will be covered in #703.
Note, Unity docs currently describe Magic Window mode using:
UnityEngine.XR.XRSettings.enabled = false;
Camera.main.GetComponent<Transform>().localRotation = UnityEngine.XR.InputTracking.GetLocalRotation(XRNode.CenterEye);
However, in the Daydream case, the user will see a transition view after calling XRSettings.LoadDeviceByName("Daydream"), even though UnityEngine.XR.XRSettings.enabled remains false.
I've documented a basic script showing a working magic window which you can use to get started in your project: https://github.com/googlevr/gvr-unity-sdk/wiki/Magic-Window
It doesn't work. When I try to put it to MainCamera as script of GameObject, it says that I should fix compile errors before attaching it to GameObject. So when I compile it through Visual Studio it says:
"CS0229 C# Ambiguity between GyroController.CheckDrag() and GyroController.CheckDrag()" And so on. Also I noticed that you forgot one "}" at the end. Please help me to fix that error. Thank you!
I added this missing }, but the script appears to compile just fine. Can you git it another try?
Magic Window is now documented here:
https://developers.google.com/vr/develop/unity/guides/magic-window