Vixen
02b45cc4
csharp
public readonly record struct XrActionState

What an action was worth this frame.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

One struct for every type rather than five, because the alternative is a generic action and a generic action cannot live in one list that the session syncs. The unused fields are four bytes each and the clarity of action.State(hand).Float is worth them.

Fields and properties (7)

  • public bool IsActive

    Whether the runtime is currently able to produce a value. False for a controller that is not turned on, an action nothing is bound to, and every action while the session lacks focus.

  • public bool Changed

    Whether it differs from last frame — which is what an edge-triggered read wants.

  • public bool Boolean

    Its value, for a boolean action.

  • public float Float

    Its value, for a float action.

  • public Vector2 Vector

    Its value, for a two-axis action.

  • public XrPose Pose

    Its value, for a pose action.

  • public bool IsTracked

    Whether a pose action's pose is being tracked right now, rather than extrapolated from where the device was last seen.

Methods (1)

  • public XrActionState(bool IsActive, bool Changed = false, bool Boolean = false, float Float = 0, Vector2 Vector = default(Vector2), XrPose Pose = default(XrPose), bool IsTracked = false)

    What an action was worth this frame.

Used by (7)

  • NullXrBackendTestsVixen.Xr.Tests
  • NullXrSessionVixen.Xr
  • OpenXrSessionVixen.Xr.OpenXR
  • XrActionVixen.Xr
  • XrActionSetTestsVixen.Xr.Tests
  • XrTrackingSystemVixen.Xr
  • XrTrackingSystemTestsVixen.Xr.Tests