Take Screenshot from code
Is there a way to trigger the OS Screenshot (similar to the "Take picture" button or the "home menu + pull trigger" shortcut) from code? I'm using Unity and my guess is that it is not exposed through Meta's API, but maybe there is a way to launch the android process somehow?973Views3likes2CommentsUnity ASW URP Fork doesn't work with RenderTextures / Lit Shader
I'm using the Meta URP fork for ASW support (Unity 2022.3). I also have functionality in my game for taking an instant photo onto a RenderTexture. However when I do this the images I get seem to be showing the motion vectors and nothing else. Its definitely due to the fork as identical setup (Vulkan / Standalone build) worked perfectly before the switch over. PCVR / DX11 works fine either way. Is there any way to strip the motion data out of these or a way to force that particular camera to not do the motion vector pass? Also reported here with images: https://github.com/Oculus-VR/Unity-Graphics/issues/34 Sorry for repeat convo (put in the wrong board to start with)414Views0likes0CommentsQuest 2 screenshot in android apk made in Android studio
Hey, I have an issue with taking screenshots in an app that I made in Android Studio, I have tried several different permissions: WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE, CAMERA, CAPTURE_VIDEO_OUTPUT, MEDIA_CONTENT_CONTROL, READ_FRAME_BUFFER, I have also tried removing the FLAG_SECURE but no matter what I try inside the Quest 2 headset I get the message "The developer has disabled taking photos in this app."1.2KViews0likes1CommentTake a screenshot
Hi, I develop for Oculus Quest on Unity 2019.3.8f1. I want to take a screenshot when my user push a button on the right controller. To do the "screenshot" part, I use the following line : ScreenCapture.CaptureScreenshot(Path.Combine(Application.persistentDataPath, "screenshot.jpg")); This one work on Unity Editor, not on the Quest. I've put some debug so I'm sure this code is called. Just when I go in the right folder (with SideQuest), my file is not there. Can someone help me ? Thanks.1.7KViews0likes1CommentHelp! Trying to replicate what OculusMirror.exe does, but without the graphical front end.
The goal is to create a screen capture tool that doesn't need OculusMirror.exe to be up and visible, the frames would be grabbed and saved from code. I started with the OculusRoomTiny_Advanced/ORT(Mirror Variants) sample, and have it compiling and running. I'm trying to pass in ovrInit_Invisible to ovr_Initialize, so that it doesn't show up in the Oculus Apps list. But nothing seems to render with that, except for the Oculus courtyard / menu app. I was hoping I could simply not call ovr_SubmitFrame, and ovr_GetMirrorTextureBufferDX would continue to pick up what ever other game/app is running. But I can't get anything to work. Has anyone else out there tried to replicate what OculusMirror.exe does?487Views0likes0CommentsGrab a screenshot from Rift and immediately display it
Hello everyone, for an experiment we would like to grab a a screenshot from the rift (i.e what the Unity camera renders to it) and display it immediately for about a second. We tried the following code: Camera camOV = mainCam; //OVRPlugin OVRController camOV.targetTexture = tex; // A public RenderTexture RenderTexture currentRT = RenderTexture.active; RenderTexture.active = camOV.targetTexture; camOV.Render(); Texture2D imageOverview = new Texture2D (camOV.targetTexture.width, camOV.targetTexture.height, TextureFormat.RGB24, false); imageOverview.ReadPixels (new Rect (0, 0, camOV.targetTexture.width, camOV.targetTexture.height), 0, 0); imageOverview.Apply (); yield return new WaitForSeconds (2); //RenderTexture.active = currentRT; camOV.targetTexture = RenderTexture.active; However, this results in a certain flicker for 2 seconds (although it looks fine in the editor). How else can we achieve this? Thanks in advance /Seb362Views0likes0Comments