C Specification

The XrActionSetCreateInfo is defined as:

typedef struct XrActionSetCreateInfo {
    XrStructureType             type;
    const void* XR_MAY_ALIAS    next;
    char                        actionSetName[XR_MAX_ACTION_SET_NAME_SIZE];
    char                        localizedActionSetName[XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE];
    uint32_t                    priority;
} XrActionSetCreateInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • actionSetName is an array containing a NULL terminated non-empty string with the name of this action set.

  • localizedActionSetName is an array containing a NULL terminated UTF-8 string that can be presented to the user as a description of the action set. This string should be presented in the system’s current active locale.

  • priority defines which action sets' actions are active on a given input source when actions on multiple active action sets are bound to the same input source. Larger priority numbers take precedence over smaller priority numbers.

Description

When multiple actions are bound to the same input source, the priority of each action set determines which bindings are suppressed. Runtimes must ignore bindings from action sets with a lower priority number if those specific bindings are also present in active actions within a higher priority action set. If multiple action sets with the same priority are bound to the same input source and that is the highest priority number, runtimes must process all those bindings at the same time.

Two actions are considered to be bound to the same input source if they use the same identifier and optional location path segments, even if they have different component segments.

When runtimes are ignoring bindings because of priority, they must treat the binding to that input source as though they do not exist. That means the isActive field must be false when retrieving action data, and that the runtime must not provide any visual, haptic, or other feedback related to the binding of that action to that input source. Other actions in the same action set which are bound to input sources that do not collide are not affected and are processed as normal.

If actionSetName or localizedActionSetName are empty strings, the runtime must return XR_ERROR_NAME_INVALID. If actionSetName or localizedActionSetName are duplicates of the corresponding field for any existing action set in the specified session, the runtime must return XR_ERROR_NAME_DUPLICATED. If actionSetName contains characters which are not allowed in a single level of a well-formed path string, the runtime must return XR_ERROR_PATH_FORMAT_INVALID.

Valid Usage (Implicit)
  • type must be XR_TYPE_ACTION_SET_CREATE_INFO

  • next must be NULL

  • actionSetName must be a null-terminated UTF-8 string whose length is less than or equal to XR_MAX_ACTION_SET_NAME_SIZE

  • localizedActionSetName must be a null-terminated UTF-8 string whose length is less than or equal to XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE

  • priority must be a valid uint32_t value

See Also

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.