API

Function attachXrFeature

  • 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/optionalFeatures are fixed at requestSession time, so spec.sessionFeatures is not applied here — only use attachXrFeature for features whose native descriptors were already granted (or that need none, like pointer selection).

    Parameters

    Returns XrFeatureHandle

    The live feature handle.