I’m running an experiment using VR and AR headsets and was wondering if there was a way to bring up a GUI screen once I press play in Unity. I want this screen to have things like subject id, age etc and to be shown in the headset but have the information entered through a keyboard by the experimenter. Once the information is entered i’d like to exit the GUI and show the actual experiment on the headset. Is there any way to do this?
Thanks
Sure. Just add a World-Space Canvas to your scene.
2 Likes
Also the XR Interaction Toolkit has out of the box support for interacting with uGUI in game!
2 Likes
I added a world space canvas that has all my user interfaces. I am running into two problems.
-
When I press play the canvas looks ‘warpy’. Is there a way to always show the canvas in the center regardless of head position?
-
When I press play in unity I am unable to interact with the UI elements with my mouse/keyboard. Is there a way to do this?
I’m not sure what you mean by “warpy”. You surely don’t mean to keep the canvas always centered in the user’s field of view; that would be very annoying and contrary to standard behavior. So… in the center of what, exactly?
As for interacting with your UI elements with mouse and keyboard, the answer depends. What platform are you running on? And is this an issue only when running within the Unity debugger, or does it also occur when in a built app?
Basically I want the canvas to be displayed in the center of the user’s field view regardless of how they move (like a screen space camera) and the inputs are supposed to register by keyboard/mouse within Unity.
So far in my menu I have a button that works but only if it is on screen space overlay (can’t see it in the headset). This button is pressed to go to another scene. On screen space camera I can see the menu in the headset but nothing happens when I press the button in Unity. When I use world space I can’t click on the button on the screen. I want to be able to see the screen in the headset but record input through my mouse and keyboard.
I am running unity 2019 on Windows.
So you’re running on Vive or Rift? …Hmm, I would expect that to work, but I’ve never actually tried it (I mostly develop on Mac for Go/Quest, but that’s quite different because it’s an Android device).
Yeah i’m using a rift and the only way I seem to be able to interact with the UI on screen through my computer is using screen space overlay