C Specification

// Provided by XR_EXT_stationary_reference_space
typedef struct XrStationaryReferenceSpaceGenerationIdResultEXT {
    XrStructureType    type;
    void*              next;
    XrUuid             generationId;
} XrStationaryReferenceSpaceGenerationIdResultEXT;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to the next structure in a structure chain.

  • generationId is an XrUuid that contains the returned space generation ID.

Description

The XrStationaryReferenceSpaceGenerationIdResultEXT structure returns the STATIONARY reference space generation ID.

All STATIONARY reference XrSpace handles share the same UUID in a given session.

The runtime must not return an empty UUID, i.e. a UUID with all zeros in its bytes. The empty UUID typically reserved to represent an invalid UUID value, and the generation ID of STATIONARY space must never be invalid.

To detect whether the STATIONARY reference space origin has changed during a period in which the session was not running, an application gets the generationId after a successful xrBeginSession and compares the XrUuid with a generationId from a previous session.

For this use case the application is responsible for remembering the ID from a previous session.

The equality of generationId is a reliable indicator for the application to determine the equality of the STATIONARY space origin across multiple sessions, application restarts, or device restarts.

However, this does not imply that when generationId is different, the origin is not at the same location or in close proximity. It also does not imply that the same origin always returns the same ID.

Note
Note

If the application is interested in identifying the space the user is in, it should use the XR_EXT_spatial_persistence and XR_EXT_spatial_persistence_operations extensions instead.

Because the generation ID of the STATIONARY reference space cannot be used to identify a space, the runtime must not require the application to request any permissions to use the stationary reference space.

For systems that are not capable of relocating the STATIONARY space across sessions, for example because the tracking system does not support relocalization or the platform blocks location persistence due to privacy requirements, the runtime may return a different generation ID for each session, and the STATIONARY space origin may be at a different location in the physical world across sessions.

The runtime may or may not use the same generationId for STATIONARY space across applications.

When the runtime loses tracking or before relocating the space origin while starting a new session or application, it may attempt to relocate the space origin for reasonable duration. During this relocation phase, the runtime must return the previous generationId for the STATIONARY space, not raise the XrEventDataReferenceSpaceChangePending event, and return untracked data for all space locate functions when using the STATIONARY space, such as xrLocateSpace or xrLocateViews.

When the runtime changes the placement of the STATIONARY space origin in the physical world, typically after a reasonable timeout during which it attempted but failed to relocate the previous space origin, or when the runtime is certain that the user has moved to a different physical space, it must raise an XrEventDataReferenceSpaceChangePending event with XrEventDataReferenceSpaceChangePending::poseValid set to XR_FALSE, indicating that the new space and the old space are unrelated. The application then queries the xrGetStationaryReferenceSpaceGenerationIdEXT function to obtain the changed XrUuid if desired.

The runtime must not reuse the same XrUuid once the corresponding origin of the STATIONARY reference space is changed, i.e. the returned XrUuid must be unique once it is changed and will never repeat.

The runtime must generate a new UUID every time a new generationId is created, typically using the uuid_generate* function on Linux or the CoCreateGuid function on Windows.

The runtime must not reuse any UUID from the underlying spatial anchor or spatial entity system.

Valid Usage (Implicit)

See Also

Document Notes

For more information, see the OpenXR Specification

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

Copyright 2014-2026 The Khronos Group Inc.