Hello everyone.

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.
Options

Holograms 210 Chapter 2 example with more than one Hologram

gussabinagussabina
edited November 2016 in Questions And Answers

Hello:
I'm working on a apps which basically re-uses the Holograms 210 Chapter 2 example code. So I have a GameObject with the Interactible.cs, InteractibleManager.cs, CursorManager.cs, etc. Idea is to show some UI Text fields attached to the GameObject when user gazes the Hologram and hide them when not. Everything works fine.
Now, the problem arises when I add more GameObjects as the idea is to have more than one Hologram and do the same thing. In this case, I created different classes Interactible1.cs, Interactible2.cs and Interactible3.cs for each GameObject, but continue using only one InteractibleManager.cs. However, things are not working in this case. It seems "GazeEntered" and "GazeExited" messages are not received but InteractibleX.cs code... Looking closer at InteractibleManager.cs, I see it uses "FocusedGameObject.GetComponent< Interactible >( )" which of course the Interactible class doesn't exist (there are 3 classes now). I guess this is the problem....
So how should I modify the code in this case? Should I have 3 InteractibeManagers (one for each Hologram)?

Thank you very much for your support.
Regards;
Gus

Best Answer

Answers

Sign In or Register to comment.