API reference
API reference
Select your platform
No SDKs available
No versions available

DataModelInspectorFeature

DataModelInspectorFeature

class DataModelInspectorFeature(val spatial: SpatialInterface, val componentManager: ComponentManager, val port: <Error class: unknown class>) : SpatialFeature
The Data Model Inspector (DMI) feature provides real-time debugging capabilities for the ECS in a Spatial SDK project.
DMI offers a live view of your scene’s data model directly in Android Studio, making debugging easier by allowing developers to:
  • Monitor entity attributes in real-time as they change during runtime
  • Temporarily modify entity attributes without rebuilding the application
  • Select entities either from the inspector panel or directly in the 3D scene
  • Search and filter entities and their attributes
This feature works in conjunction with the Meta Horizon Android Studio Plugin, which provides a dedicated panel for interacting with the data model. This should not be enabled in the release version of an app.
override fun registerFeatures(): List<SpatialFeature> {
  val features = mutableListOf<SpatialFeature>()
  if (BuildConfig.DEBUG) {
    ...
    features.add(DataModelInspectorFeature(spatial, this.componentManager))
  }
}
See also

Constructors

NameSummary
DataModelInspectorFeature
constructor(spatial: SpatialInterface, componentManager: ComponentManager, port: <Error class: unknown class>)

Properties

NameSummary
componentManager
val componentManager: ComponentManager
port
val port: <Error class: unknown class>
spatial
val spatial: SpatialInterface

Functions

NameSummary
componentsToRegister
open fun componentsToRegister(): List<ComponentRegistration>

Override this function to define a list of components that should be used by the application.
earlySystemsToRegister
open fun earlySystemsToRegister(): List<SystemBase>

Override this method to register your systems that should be executed with com.meta.spatial.core.PriorityGroup EARLY.
getDependencies
open fun getDependencies(): List<KClass<out SpatialFeature>>

Override this method to define a list of dependencies required by this feature. This will be verified at runtime.
lateSystemsToRegister
open override fun lateSystemsToRegister(): List<SystemBase>

Override this method to register your systems that should be executed with com.meta.spatial.core.PriorityGroup LATE.
loadLibrary
open fun loadLibrary(libName: String)

Loads a native library into the application.
onCreate
open override fun onCreate(savedInstanceState: <Error class: unknown class>?)

Called when the application is created. Override this method to perform actions during the OnCreate() lifecycle of the application.
onDestroy
open fun onDestroy()

Called when the application is in onDestroy callback. Be aware that onDestroy() is not guaranteed to be called. Override this method to perform actions during the OnDestroy() lifecycle of the application.
onPauseActivity
open fun onPauseActivity()

Called when the activity is in onPause callback. Override this method to perform actions during the OnPause() lifecycle of the application.
onResume
open fun onResume()

Called when the application is resumed. Override this method to perform actions during the OnResume() lifecycle of the application.
onSceneReady
open fun onSceneReady()

Called when the scene is ready. Override this method to perform actions during the OnSceneReady() lifecycle of the application.
onSpatialShutdown
open fun onSpatialShutdown()

Called when the application is shutting down. Clean up all Spatial resources for your feature, e.g. entites.destroy(), in this callback.
onStart
open fun onStart()

Called when the application is started. Override this method to perform actions during the OnStart() lifecycle of the application.
onStopActivity
open fun onStopActivity()

Called when the activity is in onStop callback. Be aware that onStop() is not guaranteed to be called. Override this method to perform actions during the OnStop() lifecycle of the application.
onVRPause
open fun onVRPause()

Called when the VR mode is paused. Override this method to perform actions during the OnVRPause() lifecycle of the application.
onVRReady
open fun onVRReady()

Called when the VR mode is ready. Override this method to perform actions during the onVRReady() lifecycle of the application.
preRuntimeOnCreate
open fun preRuntimeOnCreate(savedInstanceState: <Error class: unknown class>?)

Called before the application’s onCreate() method is called. Override this method to perform actions before the rest of the OnCreate() lifecycle of the application.
registerRequiredOpenXRExtensions
open fun registerRequiredOpenXRExtensions(): List<String>

Override this function to define a list of required OpenXR extensions that should be enabled by your application.
systemsToRegister
open fun systemsToRegister(): List<SystemBase>

Override this method to register your systems that should be executed com.meta.spatial.core.PriorityGroup NORMAL.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon