Spatial SDK is an optional capability you add to an Android app. If your app targets Meta Horizon OS without spatial features, see Horizon OS apps instead.
What you’ll learn
This tutorial is an interactive walkthrough of the workflow you’ll use when creating or converting an app with Spatial Editor and Spatial SDK. If you’re new to Android development and choose to do both the required and optional sections, you’ll need at least an hour to complete this tutorial.
This tutorial will teach you how to:
Set up a new Spatial SDK app, or add Spatial SDK to an existing 2D Android app.
Import 3D assets.
Manipulate 3D assets both programmatically and through Spatial Editor.
Create and use custom components.
Embed 2D content into a 3D VR environment as an interactable panel.
Preview your app’s VR environment.
To learn about best practices that will further enhance your app’s user experience and broaden its audience, see the design guidelines.
Before you begin
To start development, you’ll need:
Install Meta Spatial Editor for Windows or Mac, which already includes the CLI needed to export projects. Meta Spatial Editor is a visual composition tool that lets you import, arrange, and transform 3D assets into spatial layouts without writing code. The included CLI handles exporting your Spatial Editor projects into your Spatial SDK app.
A Meta Quest device (Quest 2, Quest Pro, or Quest 3) for testing your app in a VR environment.
Choose your primary workflow
Choose the workflow that matches how you want to build. Each option can stand on its own, and compatible tools can be combined as needed. The steps that follow use Android Studio.
To move around your scene, click panels, and grab objects with a keyboard and mouse while your app runs on the headset, set up Input forwarding. This step is optional, and it works with either workflow.
Developer Mode is intended for development tasks such as running, debugging, and testing applications. Engaging in other activities may result in account limitations, suspension, or termination. For more information, see Content Guidelines.