public sealed class XrActionOne thing the game wants to know about or do, independent of what does it.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Actions, not buttons, and this is the whole of OpenXR's input design. A game asks for "teleport" and the runtime decides that on this headset that is the right thumbstick forward and on that one it is the trackpad — and the user can rebind it. A game that read buttons directly would need a table per controller and would break on the next one.
One action, both hands. A grab is one action with a state per hand rather than two actions, which is what makes "either hand can pick things up" one piece of code. That is what OpenXR calls a subaction path, and it is why State takes a hand.
Fields and properties (7)
public XrActionSet SetThe set it belongs to.
public string NameIts name, which must be lower-case and is what the runtime knows it as.
public string LocalisedNameWhat it is called in the runtime's own rebinding interface, in the user's language.
public XrActionType TypeWhat kind of value it carries.
public object? BackendHandleWhatever the backend needs to find this action again. Not for callers.
public bool IsPressedWhether it is pressed on either hand.
public bool WasPressedThisFrameWhether it became pressed this frame, on either hand.
Methods (3)
public XrActionState State(XrHand hand)What it was worth this frame.
public void Publish(XrHand hand, in XrActionState state)Sets a hand's state. Called by the session during a sync.
public void Deactivate()Marks every hand inactive, which is what an unfocused session's actions are.
Used by (9)
- IXrSessionVixen.Xr
- NullXrBackendTestsVixen.Xr.Tests
- NullXrSessionVixen.Xr
- OpenXrSessionVixen.Xr.OpenXR
- XrActionSetVixen.Xr
- XrActionSetTestsVixen.Xr.Tests
- XrSuggestedBindingVixen.Xr
- XrTrackingSystemVixen.Xr
- XrTrackingSystemTestsVixen.Xr.Tests