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

ToolkitFeature

ToolkitFeature

class ToolkitFeature(val glXFManager: GLXFManager, spatial: SpatialInterface, systemManager: SystemManager, ctx: <Error class: unknown class>) : SpatialFeature
ToolkitFeature is a com.meta.spatial.core.SpatialFeature that provides core toolkit functionality for Spatial SDK applications. This feature is registered by default in AppSystemActivity, so you do not need to manually register it in your registerFeatures() method
The ToolkitFeature registers essential systems and components that provide common functionality for spatial applications, including:
  • Mesh creation through the Mesh component
  • Panel creation through the Panel component
  • Audio playback
  • Input handling
  • Animation
  • Transformation and scaling via the Transform and Scale components
  • Visibility control with the Visible component
  • Grabbable objects
  • Followable objects
  • GLXF asset loading and management
  • Other Default Spatial SDK Functionality

Constructors

NameSummary
ToolkitFeature
constructor(glXFManager: GLXFManager, spatial: SpatialInterface, systemManager: SystemManager, ctx: <Error class: unknown class>)

Properties

NameSummary
glXFManager
val glXFManager: GLXFManager

Functions

NameSummary
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.
loadLibrary
open fun loadLibrary(libName: String)

Loads a native library into the application.
onCreate
open 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.
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.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon