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.
How to Load File (pdf,jpg,etc) from HoloLens App
I'm new in the world of app development with HoloLens and with UWP apps in general. I have basic training of C# and Unity, and started to know how works HoloLens in general.
I'm currently trying to develop a simple UI 2D app. The idea is to have 4 buttons which each of them opens a predefined file (pdf, jpg, etc).
The "app" works perfectly in Unity (I wrote a very simple script where a method called OpenURL opens a file with Applications.OpenURL). However, when I deploy it in the HoloLens it doesn't work - More specifically, The app crashes when I press any button.
At first, I thought that the reason may be that the HoloLens is trying to access a local path that it doesn't exist anymore in the HoloLens (The path C:/Users/... would not make sense in the HoloLens). I tried to use the Application.addPath to fix the issue (https://docs.unity3d.com/Manual/StreamingAssets.html) but it didn't work either.
After going in depth with this problem on Internet, I noticed that there are currently two ways of doing this:
- Azure Microsoft
The problem is that there's not much information about how to develop the coding or the steps that should be followed to do this. I tried to find coding about this but I still haven't found anything yet.
I wanted to ask the community if someone has developed an app that loads files directly from a local server or from other environments. In that case, would be possible to have some sort of explanation about how to do it?
I would very much appreciate your help since I have been some sort of frustrated with this. Also, I noticed this a persistent issue for many developers; so this could be a great way to definitely sort it out and close the topic
Thanks in advance!