SpatialActivityManager.getAppSystemActivity().getSystemManager().findSystem<MySystem>() // Grabs the system manager which provides access to all registered systems. SpatialActivityManager.getAppSystemActivity().getSceneObject() // Grabs the scene
object SpatialActivityManager
currentActivity
: WeakReference?
[Get][Set] |
The current Spatial activity.
Signature
var currentActivity: WeakReference<AppSystemActivity>? |
executeOnAppSystemActivity
(
runnable
)
|
This function is used to execute a block of code on the current AppSystemActivity's main thread. If the current activity has not been set or has been garbage collected, it will throw an exception.
Signature
fun executeOnAppSystemActivity(runnable: (activity: AppSystemActivity) -> Unit) Parameters
runnable:
Function1
|
executeOnVrActivity
(
runnable
)
|
This generic function is used to execute a block of code on the current activity's main thread. If the current activity has not been set or has been garbage collected, it will do nothing.
Signature
inline fun <T : AppSystemActivity> executeOnVrActivity(crossinline runnable: (activity: T) -> Unit) Parameters
runnable:
Function1
|
getAppSystemActivity
()
|
This function is used to get the current activity. This allows you to specify your activity so that you can access data on it. If the current activity has not been set or has been garbage collected, it will return null. Otherwise, it will return the current activity and cast it to type AppSystemActivity.
Signature
fun getAppSystemActivity(): AppSystemActivity Returns |
getVrActivity
()
|
This generic function is used to get the current activity. This allows you to specify your activity so that you can access data on it. If the current activity has not been set or has been garbage collected, it will return null.
Signature
inline fun <T : AppSystemActivity> getVrActivity(): T |