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.
Adding Holograms via c#
Hi,
Im just starting my journey with HoloLens and I could use some tips from you .
Ive watched courses and all of them says that if i want to add holograms to my program I have to do it using unity. Create a project in Unity and then deploy a C# code.
Ive done so, but.
Lets say i have a holographic sphere generated, and placed in front of the user.
Now, i want to change a hologram, from sphere to lets say, a square.
In tutorials they say i have to go back to unity, use another hologram files, ten deploy c# code with unity and so on.
But i want to do it in Visual Studio, skipping the unity part.
And my question is, where in the basic code, i can do that.
I want to find a function that loads a files with holograms to the project, and displays holograms to the user. But I cant find it
Simply, add few hologram files to the project, but via c# code chose, which hologram will be displayed to the user.
Any clues, where to look for it?
I will realy appreciate if somebody links me some tutorials that explains how holograms are generated in c# code. I cannot find such tutorial in official MS website.
Best Answer
-
kkalina ✭
Changing the Unity-generated Visual Studio solution is likely non-trivial and not good practice.
The best course of action here would be to create a Unity program that loads an external model file on start (or on command), then you can change that model file as you wish. You can also do this for multiple files and let the user switch through them via a UI.
Do a google search for "Unity load model file at runtime" or something similar and you'll get plenty of info.5
Answers
Changing the Unity-generated Visual Studio solution is likely non-trivial and not good practice.
The best course of action here would be to create a Unity program that loads an external model file on start (or on command), then you can change that model file as you wish. You can also do this for multiple files and let the user switch through them via a UI.
Do a google search for "Unity load model file at runtime" or something similar and you'll get plenty of info.