// ImmersiveActivity.kt (your immersive Spatial SDK activity)
override fun registerFeatures(): List<SpatialFeature> {
return listOf(
VRFeature(),
IsdkFeature(),
PhysicsFeature())
}
// ImmersiveActivity.kt (your immersive Spatial SDK activity)
fun myHelperFunction() {
val toolkitFeature = featureManager.tryFindFeature<ToolkitFeature>()
...
}
class FeatureManager(val features: List<SpatialFeature>)
FeatureManager
(
features
)
:
FeatureManager |
Signature
constructor(features: List<SpatialFeature>) Parameters
features:
List
Returns |
features
:
List
[Get] |
The list of SpatialFeature instances managed by this FeatureManager
Signature
val features: List<SpatialFeature> |
findFeature
(
clazz
)
:
FeatureManager |
Finds a SpatialFeature of the specified type or throws an exception if not found.
Signature
fun <T : SpatialFeature> findFeature(clazz: KClass<T>): T Parameters
clazz:
KClass
Throws
Exception
|
findFeature
()
:
FeatureManager |
Finds a feature of the specified SpatialFeature class or throws an exception if not found.
Signature
inline fun <T : SpatialFeature> findFeature(): T Throws
Exception
|
tryFindFeature
(
clazz
)
:
FeatureManager? |
Attempts to find a SpatialFeature of the specified type, or null if no matching feature is found.
Signature
fun <T : SpatialFeature> tryFindFeature(clazz: KClass<T>): T? Parameters
clazz:
KClass
|
tryFindFeature
()
:
FeatureManager? |
Attempts to find a feature of the specified SpatialFeature class.
Signature
inline fun <T : SpatialFeature> tryFindFeature(): T? |