text
stringlengths
0
1.11k
Get Started with Scene using Building Blocks
Unity
All-In-One VR
The platform for which this article is written (Unity) does not match your preferred platform (Nativa).
Haz clic aquí para ver la página del índice de la documentación para tu plataforma de preferencia.
This page details how to Get Started with Scene quickly using Building Blocks. It also has you monitor your running application using the Meta XR Simulator, so you don’t need to switch to your headset during development or testing. Once built, you can use this completed tutorial as a starter project for any other Scene project you wish to start.
Prerequisites
Before you begin this tutorial, do the following:
Set up your Unity development environment and configure your Quest headset.
Verify that your headset is running the latest OS version. In the headset, go to Settings > System > Software Update and update if necessary. Scene requires OS v40 or higher.
Configure your VR space to contain one or more room components, such as a table. Configuring a few room objects will highlight Scene’s ability to make use of them. If you have never run Space Setup, the app will prompt you to capture your space. If you want to reconfigure your room before beginning:
In your headset, go to Settings > Physical Space > Space Capture
Choose Set Up.
When you are done with Space Setup, enable the Show Mixed Reality Objects toggle.
Set up a new Unity project following the guide Create Your First VR App on Meta Quest Headset.
Install the Meta XR Simulator using the instructions at Meta XR Simulator.
Optionally, set up Meta Quest Developer Hub and Meta Quest Link.
Prepare the Scene
Remove the default camera from the scene, and save the scene under a new name.
In the Hierarchy, remove the Main Camera game object. Then select the scene.
On the File menu, choose Save As....
Navigate to the Assets > Scenes folder and save the scene with a new name, such as SceneGSBB.
Add the Room Model Building Block
The Room Model Building Block is set up to make use of your space setup.
On the Oculus menu, choose Tools > Building Blocks. The Building Blocks Tool displays.
Drag the Room Model Building Block onto the Hierarchy (or, click the + button) for Room Model). When you add a building block, other dependent blocks are brought into the scene (in this case, the Camera Rig building block is added automatically).
Configure the Scene
When you added the Room Model building block, nearly all configurations have been set correctly. There are still a couple things for you to check.
In the Hierarchy, select the [BB] CameraRig.
In the Inspector, expand the OVR Manager.
Under Quest Features, under the General tab, check that Scene Support is either Supported or Required.
Check that Anchor Support is enabled.
Further down, expand Permission Requests on Startup.
Enable the Scene checkbox. (The Spatial Data Permission page contains further information and guidelines on how to manage permissions.)
The rest of the required configurations have been set up by the Room Model building block. For example, if you select the [BB] Room Model game object, you see that the OVR Scene Manager already has both the Plane Prefab and Volume Prefab properties set with existing prefabs. (For information on all the OVR Scene Manager properties that are set, as well as the makeup of the plane and volume prefabs, see the longer topic Get Started with Scene.)
Use the Project Setup Tool
On the Edit menu, choose Project Settings. The Project Settings window appears.
In the Settings list, choose Oculus.
Accept the recommendations of the tool by choosing Fix All for errors and Apply All for warnings.
Close the Project Settings window.
Save your Scene and Project
On the File menu, choose Save to save the scene.
Then, again on the File menu, choose Save Project.
Test the App with the Meta XR Simulator
You can use the Meta XR Simulator to test your Scene app with a simulated environment.
On the menu, go to Oculus > Meta XR Simulator > Activate to activate the simulator.
On the menu, go to Oculus > Meta XR Simulator > Synthetic Environment Server > Game Room.
After the Game Room window appears, minimize it. Then click the Unity Play button.
You should see something similar to the following.
Typical XR Simulator Scene View
Next steps
There are a few different directions you can now take.
To understand the details of how Scene works, see Using the Scene Model.
To see how the user’s privacy is protected through permissions, see Spatial Data Permission.
To learn about using Scene in various use cases, have a look at the Samples.
To continue with a step-by-step guide on using Scene, see the Bouncing Ball Tutorial.
Spatial Data Permission
Native SDK
Quest
The platform for which this article is written (Unity) does not match your preferred platform (Nativa).
Haz clic aquí para ver la página del índice de la documentación para tu plataforma de preferencia.
In this page you will learn about the permissions that protect the user’s spatial data.
Overview
We have introduced a new spatial data runtime permission that allows users to control which app can access their spatial data. The permission applies to apps running on Quest 2, Quest Pro, and Quest 3.
An app that wants to use the Scene Model or Depth data needs to request the spatial data permission during the app’s runtime. The request will display a one-time permission explainer dialog, followed by a permission consent confirmation dialog. Only when the permission is granted by the user can the apps query all spatial data on the user’s device.
An illustration of the permission flow UX.
Devices
Accessing spatial data through the new permission flow is effective on Quest 2, Quest Pro, and Quest 3.
Meta Quest Link
Meta Quest Link v62 introduced a new permission toggle to control the access of the spatial data. Developers need to toggle it on to get access to the spatial data when querying for anchors or using the Depth API on the device. To toggle it on, go to Settings > Spatial Data over Meta Quest Link > Turn On.