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.
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
Get PDF from Asset folder/Resources
I have a PDF file in my Assets folder: Assets/Tutorials/test.pdf
Build Action is Embedded Resource
Copy to Output Directory is Copy if Newer
How can i get the absolut Path to this PDF to show it in Edge?
I also put the pdf to the resource folder but i cannot get the File over Resources.Load("test");
Thanks for help
Tagged:
0
Answers
You could possibly take a look at the Streaming Assets folder. I haven't tested it yet, but I don't see why it wouldn't work. You would create a folder called StreamingAssets and then put your file in there. From here you can do something like this to get the file path.
string fileName = "test.pdf"
string filePath = Path.Combine(Application.streamingAssetsPath, fileName);
Documentation found here:
https://docs.unity3d.com/ScriptReference/Application-streamingAssetsPath.html
AR Developer
Jeah now i have added a StreamingAssets folder in unity and put the pdf file in it.
Now when i try to deploy it to hololens i get a AggregateException:
Deployment failed. Failed to deploy through a new deployment pipeline.
I think that happens cause the build action of the pdf file is invalid. Which action should i pick for pdfs?
Or is it another error?
Take a look at this thread:
https://stackoverflow.com/questions/41673865/how-to-launch-pdf-file-in-associated-app-in-hololens-uwp
They say to put the Build Action as Content.
AR Developer