Data Model Inspector (DMI)
Updated: Oct 7, 2025
Manually debugging your Spatial SDK project can be difficult. The Data Model Inspector (DMI) tool makes debugging easier by providing a real-time view of your scene’s data model in Android Studio. DMI lets you quickly identify issues by temporarily changing the attributes of entities without having to rebuild your app. If you’d rather make permanent changes without having to rebuild, use the
Hot reload feature.
Here’s an example of using the DMI with input forwarding to grab a basketball. Note how whenever the user interacts with the basketball, the isGrabbed Boolean updates in real time.
Manually add Data Model Inspector
If you’re using either a template created by the Meta Horizon Android Studio plugin, or any of the Spatial SDK samples, skip this section because the DMI is already included in your project. If you’re not using a template or the samples, follow these steps to add the DMI to your project.
In the [libraries] block of your project’s libs.versions.toml file, add this line.
meta-spatial-sdk-datamodelinspector = { group = "com.meta.spatial", name = "meta-spatial-sdk-datamodelinspector", version.ref = "spatialsdk" }
In the imports section of your main activity file, import the DMI feature.
import com.meta.spatial.datamodelinspector.DataModelInspectorFeature
In the dependencies {} block of app/build.gradle.kts, add the new dependency.
dependencies {
implementation(libs.meta.spatial.sdk.datamodelinspector)
}
In the RegisterFeatures() method of your main activity, register the DMI feature.
features.add(DataModelInspectorFeature(spatial, this.componentManager))
Use the Data Model Inspector
Once you build and run your app, you can access the DMI via a dedicated panel in Android Studio.
Connect your headset to your computer.
(Optional) If you set up input forwarding, in Meta Quest Developer Hub, start casting and enable input forwarding.
Build and run your app.
On the right toolbar of Android Studio, click the Meta logo to open the Meta Horizon Android Studio Plugin.
The Data Model Inspector panel opens.
Ensure the port listed in the Data Model Inspector panel matches the one specified in your DataModelInspectorFeature registration. The DataModelInspectorFeature’s default port is 8011.
In the Data Model Inspector panel, click the refresh icon next to the port number to refresh the panel.
The panel displays a list of entities in your scene.
Interact with entities in your scene to see the changes appear in the DMI.
Select entities by either clicking on the entity header in the table, or clicking on the entity in your 3D scene.
This highlights the header blue and its child rows gray. This also draws a red debug box around the entity in the 3D scene.
To disable selecting entities by clicking them in the scene, click the lock icon (Lock In-App Selection) at the top of the Data Model Inspector panel.
- Perform a fuzzy search on your attribute names, types, and values by typing them in the top search bar.
- Narrow your search by clicking the funnel icon and specifying which values you’d like to search by.
- Filter your view by clicking “Selected Only” in the filter dropdown.
- Filter your view by clicking “Recently Deleted” in the filter dropdown. The Deleted view does not support selection or edits.
- Clear all selected entities by clicking the broom icon.
Most attributes are editable. However, editing is not supported for Map, Entity, and UUID.
Initiate an edit by clicking on an attribute in the table.
This highlights the row and replaces the values with input forms for editing.
Change the values, and then click the check mark icon, or press the Enter key while the cursor is inside any of the input fields.
- Expand all rows or collapse all rows by clicking their respective icons.