Function attachXrFeature
-
Parameters
- ctx: XrSessionContext
The active session to attach to.
- spec: XrFeatureSpec
The feature spec to instantiate.
Returns XrFeatureHandle
The live feature handle.
- ctx: XrSessionContext
The active session to attach to.
The feature spec to instantiate.
The live feature handle.
Enable a feature on an already-running session at runtime (mirrors Babylon.js
enableFeature). The handle is driven and disposed by the session like any feature passed to enterXr.Note: a session's native
requiredFeatures/optionalFeaturesare fixed atrequestSessiontime, sospec.sessionFeaturesis not applied here — only useattachXrFeaturefor features whose native descriptors were already granted (or that need none, like pointer selection).