I want to get the frames of Vuforia camera (Rendered content included, not just the background).
I've made a script for an application that should be available for Android and for Hololens. On Android (see below) it work without problems: I cann see backgroundCamera with augmented contents, but on Hololens it doesn't work well the same code. In fact, with the Hololens I can see the texture RawImageRT with only the interface and the rendered content, without the background camera (that I see in the Android app). I need help!
Note: I use as camera the LeftStereoCamera (child of ARCamera prefab).
Here is the script:
public class RenderTextureScript : MonoBehaviour
public Camera camera;
//public RenderTexture rt;
public RawImage RawImageRT;
public RawImage RawImageRT_2;
// Use this for initialization
resWidth = Screen.width;
resHeight = Screen.height;
rt = new RenderTexture(resWidth, resHeight, 24, RenderTextureFormat.ARGB32);
camera.targetTexture = rt; //Create new renderTexture and assign to camera
RawImageRT.texture = rt;
RawImageRT_2.texture = rt;
//screenShot = new Texture2D(resWidth, resHeight, TextureFormat.RGB24, false); //Create new texture
// Update is called once per frame
RenderTexture.active = rt;
//screenShot.ReadPixels(new Rect(0, 0, resWidth, resHeight), 0, 0); //Apply pixels from camera onto Texture2D