This is a sample project for the Unity Android plugin Meta Quest Screenshot Loader, which retrieves the latest screenshot images from Meta Quest.
- Meta Quest Pro
- Unity Editor 2022.3.26f
- Clone the project using the following command:
git clone --recurse-submodules https://github.com/t-34400/MetaQuestScreenShotLoaderSample.git
- Select
Add
>Add project from disk
from theProjects
tab in Unity Hub, and open the cloned directory. - Click on the added project to launch the editor.
- In the editor, open
Assets/Scenes/SampleScene
in the Project window. - Add the
ScreenShotLoader
component to theViews/Scene/LoadScreenShotCanvas/Controllers
object in the scene and configure it as shown in the image below: - From the menu bar, select
File
>Build Settings
, then choose Android in the window and press theSwitch Platform
button. - From the menu bar, select
Edit
>Project Settings
, then openMeta XR
in the window and select theFix All
andApply All
buttons if available. - Build the project.
- If the app does not have storage access permission, the
Request Permission
button will be displayed. Press this button to prompt a dialog asking for permission. - Once storage access permission is granted, the
Request Permission
button will disappear and theLoad ScreenShot
button will appear. Press this button to read the latest screenshot and set it to the Raw Image.