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, Disable one eye at runtime
Hello.
I want to disable holograms on one eye in runtime.
I have two cameras in scene (stereoTargetEye to left, right).
When I disable one camera(eg. left) and build it, on HL it working (only right eye see holograms).
But when i disable it in runtime, that display do not redraw (holograms still exists at last rendered position on display).
I tried to use alternative for disable camera like moving camera away, set farClipPlane to min value, combining prev two and then disable in next frame, also tried GL.Clear, and GL.ClearWithSkybox.
How to force that display to redraw from Unity?
I tried this in Unity 5.6.0f3
Best Answer
-
Optionsstepan_stulov ✭✭✭
Hey, @Nedja
like moving camera away
I don't think programmatic changes to HoloLens's camera will take effect, since camera's position is driven by the device. Same maybe goes for clipping planes.
Perhaps you could try showing a black unlit and bigger than near clipping plane sprite in front of the camera while switching from both eyes to one? Alternatively simply hiding all renderers for the same moment.
Just curious, what is your camera's Clear Flags?
Building the future of holographic navigation. We're hiring.
5
Answers
Hey, @Nedja
I don't think programmatic changes to HoloLens's camera will take effect, since camera's position is driven by the device. Same maybe goes for clipping planes.
Perhaps you could try showing a black unlit and bigger than near clipping plane sprite in front of the camera while switching from both eyes to one? Alternatively simply hiding all renderers for the same moment.
Just curious, what is your camera's Clear Flags?
Building the future of holographic navigation. We're hiring.
Clear Flags are Solid Color (black).
I make this for now by hiding all renderers.
I did this switch in several updates because I did not succeed with OnPreRender and OnPostRender. Maybe i will try again later again with these callbacks.
Thank you for answer.