Hello,
I’m trying to camera capture with NRSDK.
(Also, I read https://xreal.gitbook.io/nrsdk/development/miscellaneous/recording this article.)
And, I followed below code like this.
public NRKernal.NRRGBCamTexture RGBCamTexture;
private Texture2D captureTexture;
RGBCamTexture = new NRKernal.NRRGBCamTexture();
RGBCamTexture.Play();
captureTexture = RGBCamTexture.GetTexture();
File.WriteAllBytes(ImageSavePath, captureTexture.EncodeToPNG());
However, the saved .png file does not show anything (null file).
For this reason, can you help me, using NRRGBCamTexture class?
Actually, I have implemented based on NRPhotoCaptureExample.cs
, but it does not contain RGBCamTexture.GetTexture();
.
Here’s my question:
Can the camera get texture through NR camera with RGBCamTexture.GetTexture();
.?
NRSDK 2.1.0
Unity 2021.3.18f1
Thanks.