OpenXRRenderModelManager
Manager for XR device visuals and hand filters.
Creates and removes OpenXRRenderModel Entities from an active OpenXR extension. These are device visuals, not gameplay, collisions or proof that a controller is held. Requires an OpenXR/glTF build and xr/openxr/extensions/render_model enabled before startup. Class availability does not establish runtime-model availability.
Check the registered singleton and IsActive before construction. Subscribe before AddChild: existing models may appear during EnterTree. Added does not guarantee geometry; Removed precedes Entity deletion, but a filtered backend RID may already be revoked. Do not free manager-owned models.
Any/NoneSet require a direct XROrigin3D parent. Hand filters allow an intermediate XRController3D parent. MakeLocalToPose compensates for an already applied parent pose; does not change the action map. Repeating the same Tracker does not rebind after late startup.
Example and diagnosis. Current-SDK execution covered negative gate, parameters and inactive lifecycle; real provider events, filtering, geometry, headset and visual readiness were not tested.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
OpenXRRenderModelManagerConstructor
public OpenXRRenderModelManager();Creates a manager with Tracker=Any and empty MakeLocalToPose. Before new, check the registered OpenXRRenderModelExtension singleton and IsActive: native notifications access the wrapper during construction. Does not enable OpenXR, create models or establish device availability.
Properties2
MakeLocalToPoseProperty
public string MakeLocalToPose { get; set; }Pose name used to inverse-transform the internal container, initially empty. For example grip beneath an XRController3D with Pose=grip. Requires a particular-hand filter. Does not change the parent Pose or action map; pose existence is checked without HasTrackingData. A change first resets the container transform to identity.
TrackerProperty
public OpenXRRenderModelManager.RenderModelTracker Tracker { get; set; }Model filter: Any (0) selects all, NoneSet (1) selects no top-level path, LeftHand (2) and RightHand (3) select the respective hand. Initially Any. Any/NoneSet require a direct XROrigin3D parent; hand filters require an origin ancestor. A changed-value setter resolves tracker/path once; repeating the same value does not rebind a tracker that appeared later.
Methods4
GetMakeLocalToPosestring
public string GetMakeLocalToPose();Returns the stored compensation-pose name. Pose name used to inverse-transform the internal container, initially empty. For example grip beneath an XRController3D with Pose=grip. Requires a particular-hand filter. Does not change the parent Pose or action map; pose existence is checked without HasTrackingData. A change first resets the container transform to identity.
stringStored pose name or empty string, not tracking status.
GetTrackerOpenXRRenderModelManager.RenderModelTracker
public OpenXRRenderModelManager.RenderModelTracker GetTracker();Returns the stored filter; does not establish successful tracker/path resolution. Model filter: Any (0) selects all, NoneSet (1) selects no top-level path, LeftHand (2) and RightHand (3) select the respective hand. Initially Any. Any/NoneSet require a direct XROrigin3D parent; hand filters require an origin ancestor. A changed-value setter resolves tracker/path once; repeating the same value does not rebind a tracker that appeared later.
OpenXRRenderModelManager.RenderModelTrackerCurrent enum filter, not evidence of a connected hand.
SetMakeLocalToPosevoid
public void SetMakeLocalToPose(string makeLocalToPose);Stores a changed compensation-pose name. Pose name used to inverse-transform the internal container, initially empty. For example grip beneath an XRController3D with Pose=grip. Requires a particular-hand filter. Does not change the parent Pose or action map; pose existence is checked without HasTrackingData. A change first resets the container transform to identity.
| Name | Type | Default |
|---|---|---|
makeLocalToPose | string | — |
makeLocalToPosePose name used to inverse-transform the internal container, initially empty. For example grip beneath an XRController3D with Pose=grip. Requires a particular-hand filter. Does not change the parent Pose or action map; pose existence is checked without HasTrackingData. A change first resets the container transform to identity.
SetTrackervoid
public void SetTracker(OpenXRRenderModelManager.RenderModelTracker tracker);Changes the filter and marks the model list dirty; does not start XR. Model filter: Any (0) selects all, NoneSet (1) selects no top-level path, LeftHand (2) and RightHand (3) select the respective hand. Initially Any. Any/NoneSet require a direct XROrigin3D parent; hand filters require an origin ancestor. A changed-value setter resolves tracker/path once; repeating the same value does not rebind a tracker that appeared later.
| Name | Type | Default |
|---|---|---|
tracker | OpenXRRenderModelManager.RenderModelTracker | — |
trackerModel filter: Any (0) selects all, NoneSet (1) selects no top-level path, LeftHand (2) and RightHand (3) select the respective hand. Initially Any. Any/NoneSet require a direct XROrigin3D parent; hand filters require an origin ancestor. A changed-value setter resolves tracker/path once; repeating the same value does not rebind a tracker that appeared later.
Signals and events2
RenderModelAddedEvent
public event OpenXRRenderModelManager.RenderModelAddedEventHandler RenderModelAdded;Emitted when the manager creates and attaches an OpenXRRenderModel. Can fire during EnterTree: subscribe before AddChild(manager). Establishes neither loaded geometry nor current tracking confidence; do not hide fallback solely on this event.
| Name | Type | Default |
|---|---|---|
renderModel | OpenXRRenderModel | — |
renderModelBorrowed manager-owned Entity for the new model. Geometry may be absent; do not free it or assume a ready visual.
RenderModelRemovedEvent
public event OpenXRRenderModelManager.RenderModelRemovedEventHandler RenderModelRemoved;Emitted before the manager removes/queues the model Entity for deletion. The Entity is accessible during the handler, but deferred filtering may mean its backend RID is already revoked: do not query the extension through it. Do not Free/QueueFree a manager-owned model or use it next frame; release your references and restore fallback.
| Name | Type | Default |
|---|---|---|
renderModel | OpenXRRenderModel | — |
renderModelRemoving manager-owned Entity, accessible in the current handler only. The backend RID may already be invalid; do not query the extension through it or free the Entity yourself.
OpenXRRenderModelManager.RenderModelTracker
| Value | Description |
|---|---|
Any = 0 | All active render models are shown regardless of what tracker they relate to. |
LeftHand = 2 | Only active render models are shown that are related to the left hand tracker. |
NoneSet = 1 | Only active render models are shown that are not related to any tracker we manage. |
RightHand = 3 | Only active render models are shown that are related to the right hand tracker. |