docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct XrEventDataSpatialDiscoveryRecommendedEXT

    Represents an event where the runtime recommends that you call xrCreateSpatialDiscoverySnapshotAsyncEXT(ulong, in XrSpatialDiscoverySnapshotCreateInfoEXT, out ulong) for the given spatial context. Provided by XR_EXT_spatial_entity.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.OpenXR.NativeTypes
    Assembly: Unity.XR.OpenXR.dll
    Syntax
    public readonly struct XrEventDataSpatialDiscoveryRecommendedEXT
    Remarks
    Warning

    Don't initialize this struct with the default parameterless constructor. Use a constructor with parameters to ensure that type is correctly initialized to EventDataSpatialDiscoveryRecommendedEXT.

    You can avoid excessive calls to xrCreateSpatialDiscoverySnapshotAsyncEXT(ulong, in XrSpatialDiscoverySnapshotCreateInfoEXT, out ulong) by waiting for this event to be invoked before you create a new discovery snapshot.

    The OpenXR Plug-in calls xrPollEvent every frame during UnityEngine.Application.onBeforeRender. To subscribe to this event type, use OpenXRLoaderBase.TrySubscribeToEventType.

    Constructors

    XrEventDataSpatialDiscoveryRecommendedEXT(ulong)

    Construct an instance with a null next pointer.

    Declaration
    public XrEventDataSpatialDiscoveryRecommendedEXT(ulong spatialContext)
    Parameters
    Type Name Description
    ulong spatialContext

    The spatial context.

    XrEventDataSpatialDiscoveryRecommendedEXT(void*, ulong)

    Construct an instance.

    Declaration
    public XrEventDataSpatialDiscoveryRecommendedEXT(void* next, ulong spatialContext)
    Parameters
    Type Name Description
    void* next

    The next pointer.

    ulong spatialContext

    The spatial context.

    Properties

    next

    null or a pointer to the next structure in a structure chain.

    Declaration
    public void* next { get; }
    Property Value
    Type Description
    void*

    spatialContext

    The spatial context for which discovery is being recommended by the runtime.

    Declaration
    public ulong spatialContext { get; }
    Property Value
    Type Description
    ulong

    type

    The XrStructureType of this struct: EventDataSpatialDiscoveryRecommendedEXT.

    Declaration
    public XrStructureType type { get; }
    Property Value
    Type Description
    XrStructureType
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)