The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
Unity UI Canvas Placement?
I've got yet another newbie question, mostly because I'm new to Unity development in general. I have a great Hololens app and I would like to add some Unity UI objects, mostly Text. They are placed on the canvas but I do not see them in my world (yes I changed my fonts from black to another color!).
Am I supposed to move my Unity Canvas to another point in my world view?
Best Answers
-
OptionsAlexD ✭✭✭
I would recommend changing the Canvas Render mode to Screen Space - Camera and set the main Camera as "render Camera"
Also, due to a current issue with Unity you cannot change the color of the text block from black (even if you do set it to another color it will still render as black). The solution is to place the UIImage below the text to serve as a background for the text.
For reference, check ther FPSDisplay prefab in the HoloToolkit or check a related blog post on how to show an UIText in HoloLens
7 -
OptionsHoloSheep mod
@Simusid you may also need/want to adjust the scale of your canvas and for more details about things like changing the shader to the GUI/Shader and setting the color you may want to check this post.
Windows Holographic User Group Redmond
WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
WinHUGR YouTube Channel -- live streamed meetings5
Answers
I would recommend changing the Canvas Render mode to Screen Space - Camera and set the main Camera as "render Camera"
Also, due to a current issue with Unity you cannot change the color of the text block from black (even if you do set it to another color it will still render as black). The solution is to place the UIImage below the text to serve as a background for the text.
For reference, check ther FPSDisplay prefab in the HoloToolkit or check a related blog post on how to show an UIText in HoloLens
Toronto-HoloLens | Blog | @alexdrenea
If you want to interact with the GUI, you must select world space, and maybe use something like the tagalong in the HoloToolKit for Unity. Screen and camera space keep it locked in place, so you'll never be able to interact with it via gaze. In regards to the font staying black, I was able to get around this by changing the shader of the material associated with the text. I was able to get white text this way.
Thanks, I guess it wasn't really a newbie question after all. That info helped a lot and I'm working fine now.
@Simusid you may also need/want to adjust the scale of your canvas and for more details about things like changing the shader to the GUI/Shader and setting the color you may want to check this post.
Windows Holographic User Group Redmond
WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
WinHUGR YouTube Channel -- live streamed meetings
So I have created a HUD for use in the Hololens with the above suggestions of using Screen Space - Camera, etc. When I move my head however, there seems to be a trail behind the images. Is there anyway to remove this? Like with a different rendering mode or something?
@GentleSaint what do the trails look like? Are you seeing color separation?
===
This post provided as-is with no warranties and confers no rights. Using information provided is done at own risk.
(Daddy, what does 'now formatting drive C:' mean?)
Yes, that was the word I was looking for! Since the images are moving (due to them being a HUD), is there someway I can remove this or is only the corrections listed in the Color Separation page the way to go?
This is a property of how the device renders. There is no way to turn the behavior off. The corrections are the way to go.
The main corrections are making sure you are hitting 60fps, and setting the stabilization plane.
Hitting 60 fps is hard if you haven't set your quality setting to 'fastest', make sure you do that.
The 'stabilization plane' concept sounds super scary, but it's not really. You're basically just setting the position that you are expecting the user is focusing on. The best way to do this is still being worked out, but I like to set a script like this on holograms I want to keep looking stable-though this script will behave poorly if multiple objects in view have the script attached. HoloToolkit's GazeManager also has a checkbox to enable the focal plane, but it relies on your Holograms having colliders attached. The below code does not rely on a collider.
===
This post provided as-is with no warranties and confers no rights. Using information provided is done at own risk.
(Daddy, what does 'now formatting drive C:' mean?)
Ben on my team wrote a case study about setting the stabilization plane - he gives various examples from our shipped apps that illustrate different ways you might want to use it, depending on what your app does. You can see it here: https://developer.microsoft.com/en-us/windows/holographic/Case_study_-_Using_the_stabilization_plane_to_reduce_holographic_turbulence
what if I want to make a panel with a text over it appear or disappera after a click event?
can i just put the setActive false in an Initialize script then in a button manager script, i'll have setActive(true)?