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
Application.CaptureScreenshot doesn´t work
I want to save a screenshot with Application.CaptureScreenshot, and display it on a texture.
In the Editor it works, on Android too. But when I run it in the Hololens, nothing is shown on the texture. Why? If someone wants to suggest Locatable Camera: I can´t use Locatable Camera for that because I´m using Vuforia.
Tagged:
0
Answers
I think you want this:
https://docs.unity3d.com/ScriptReference/VR.WSA.WebCam.PhotoCapture.TakePhotoAsync.html
Taqtile
You may also need to disable vuforia while you capture the screenshot. I believe we had to do that but its been awhile.
Taqtile
Thanks for the answer Mark.
I need a screenshot of everything in the application (UI included), not only the camera.
The problem is also that I have to iterate it to simulate a streaming. With Application.CaptureScreenshot it works on Android while Vuforia is active.. but unfortunatly not on Hololens.. so I´m looking for a solution on this
Check out this method. It has showHolograms argument.
https://docs.unity3d.com/ScriptReference/VR.WSA.WebCam.PhotoCapture.CreateAsync.html
Building the future of holographic navigation. We're hiring.
But if I use this in a loop I should not use vuforia. I need vuforia always running for object tracking AND something that do continuously a screenshot
You might be able to use the portal API:
https://developer.microsoft.com/en-us/windows/mixed-reality/device_portal_api_reference#mixed_reality_capture
In particular: /api/holographic/mrc/photo (POST)
I haven't tried taking a photo from the portal with vuforia running but I'd guess if you logged into the portal on a browser and it was able to capture then this route would be worth exploring. If not, I am not sure if you could do both.
That said, if you are just quickly disabling vuforia, taking the screenshot, then re-enabling it should be fairly quick. You shouldn't have to hide any of the objects that are being placed by vuforia... just disable the tracking for shot which shouldn't be too noticeable assuming there isn't much movement.
Taqtile