Display text and buttons on screen for HoloLens?
I'm trying to display some text and buttons on the screen for my HoloLens, however, while the OnGUI function works in the Unity preview, it does not work on the HoloLens, both in the emulator and device. It seems that the buttons and text simply do not appear anywhere. Is there another way to display text or buttons on the screen without using OnGUI?
Answer by $$anonymous$$ · Jul 08, 2016 at 02:23 PM
on your canvas, if you set Render Mode to "Screen Space Camera" (don't forget to drag the main camera in), you can display static gui elements. This is good for text or image widgets that you want to always be visible. The problem with that is that you can't gaze at widgets.
If you set Render Mode to "World Space", your gui will be a hologram in your world. To make it similar to the main menu you can add utilitz scripts from the HoloToolkit, like the Tagalong script and the Billboard spript. That is what I did. Now I have the problem that although I can gaze at buttons, I still can't click on them because the Eventsystem for some reason doesn't automatically detect clicks on buttons.
Any help is greatly appreciated
http://forum.unity3d.com/threads/unity-ui-on-the-hololens.394629/
Do check this out. This recognized clicks for me when used with the onClick
menu in the Button (Script) part.