I'm working with hololens, and I'm trying to get the image of the front camera. The only thing I need is to take the image of each frame of that camera and transform it into a byte array.
相关问题
- Unity - Get Random Color at Spawning
- Unity3D WebGL Headless not rendering
- Unity3D loading resources after build
- Load Image from Stream/StreamReader to Image OR Ra
- Unity3D - Build Failed because of “[Unity] ERROR:
相关文章
- Programmatically setting and saving the icon assoc
- Omnisharp in VS Code produces a lot of warnings ab
- How to create a MediaClip from RenderTargetBitmap
- Call non-static methods on custom Unity Android Pl
- How can a game created in Unity can run on an Andr
- How to add Persistent Listener to Button.onClick e
- Placing an object in front of the camera
- Connecting Unity3d Android application to ActiveMQ
In player settings, enable access to the camera, and try again.
Copied from the unity documentation from the link above:
To get bytes: Replace the following method:
with the method below:
Basic sample without using PhotoCapture from unity as a workaround: More details in the link above
You must add #if WINDOWS_UWP to be able to use MediaCapture: Ideally, you want to use PhotoCapture from unity to avoid this, but until Unity resolve the issue, you can use something like this.
Do NOT forget to add capabilities to the manifest: