1

I started programming with the Google Cardboard v0.6 about a year ago. I really nailed what I was trying to do with this software. The problem is, my software requires a toggle between full screen and stereo screen modes which I have applied a canvas button for. It is also supposed to start in full screen with an option of stereo mode.

I have three questions:

  1. With the new SDK, is it possible to script a stereo to full screen toggle routine?

I noticed they make the GoogleVR as a fixed SDK mount within the build settings. I read something along the lines of widget controls within the Android SDK but I'm not to savvy with the way Android Studio reads the APK and how to modify it. Honestly, I'm running Visual Studio with a Source Control library in TFS so I want to keep it out of Android Studio as much as possible.

  1. I also read there is supposed to be a full screen toggle button programmed directly into the SDK but it just doesn't pop up on my screen. Perhaps there's a method of making this button pop up that will save the day?

Even if the button exists, if there is a toggle button I'd love to have the script reference so I can apply it On Start in order to start in full screen mode.

  1. Will toggling full screen reactivate screen canvases?

I know the new GoogleVR does not allow canvases because they have a RenderTexture problem. I'm not too concerned because I'm going to make the Toggle button freeze if no control device is registered to the bluetooth, and if there is I have a button on the control device that returns to full screen (or hopefully with that magical screen button that should exist). Whether I can toggle between the two settings is not going to make a difference if it still doesn't allow for Canvases in full screen.

My greatest frustration right now is with the discontinuation of the scripts on build. I've been using the GVRViewer and such which work just like the V0.6 software, but it appears to completely negate these scripts on build and force the build to use the SDK. I've read in the release notes that at the moment they have no intention of returning to the v0.6 platform and even recommend rolling it back to v0.6 if this is the case, but honestly - if we are forced to use an antiquated version of the software, how long will it be before it gets phased out? In my opinion based on my current observations, this feels a lot like a "one step forward, two steps back" situation.

livingtech
  • 3,570
  • 29
  • 42
  • I'd love to see some answers to these questions too. For my project, I'm rolling back to Unity 5.5 (and a much older version of GVR), exactly because of the "launch in fullscreen" issue, as well as a few others. – livingtech May 16 '17 at 14:39
  • FWIW, the "unity 5.6 way" of turning on and off full-screen or VR mode is `VRSettings.enabled = false;`, you'll also need `using UnityEngine.VR;` ...but I wasn't able to find a place to do that on app launch that didn't show a split-second of stereoscopic view first. If there is a way, it isn't documented well, or at all. That's for sure. – livingtech May 16 '17 at 14:42
  • so far what I've been doing is putting in a float with a value of one, then on Update, if float = 1 then toggle VR to fullscreen and change the float to 0. This way, rather than on startup it still has that split second when it thinks it's in VR and needs to switch back. Thanks for the VRSettings.enabled code. I still have my 5.6 version on my machine in a side project so I'll try to implement it. – Sebastien5246 May 17 '17 at 20:02
  • You're a lifesaver, dude! Check it out: – Sebastien5246 May 17 '17 at 21:00
  • so I did end up using the VRSettings.enabled to replace my VRModeEnabled. It's a mixed blessing but it is kind of for the better. Right now I'm using on onscreen button to toggle between full screen and VR. As I mentioned above, I have a float that starts at 1, gets replaced on update to 0. If the button is pushed, it jumps between 0 and 2 to toggle Full Screen and VR. However, I also have a UI canvas for each full screen and VR, each of which have the little toggle button. Now, VR does not allow for rendering textures, but the button still "exists" and I can still click it to get back to FS! – Sebastien5246 May 17 '17 at 21:02
  • There is still an issue, though. Toggling into VR and returning to full screen keeps the stereo-related field of view (since the VR is really just a greater field of view that's squished to half a screen). I tried adding a line of script to return the field to 60 but it didn't work. I was going to add a .projection line but there is a whole lot of options I'm not so accustomed to yet. I'm going to fish through it and see what I can get. – Sebastien5246 May 17 '17 at 21:20
  • found it. ResetAspect() . It's not a field of view override. – Sebastien5246 May 17 '17 at 21:39
  • I'm not 100% sure I'm following all of this. I'd love to see your code, if you are willing. (You can post an answer for your own question!) – livingtech May 18 '17 at 00:35

0 Answers0