docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ApiLayers.ApiLayer

    Contains information about an imported OpenXR API layer, including its enabled state and path. This struct is the primary representation of an API layer within the OpenXR settings.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.OpenXR
    Assembly: Unity.XR.OpenXR.dll
    Syntax
    [Serializable]
    public struct ApiLayers.ApiLayer
    Remarks

    The ApiLayer struct represents a single OpenXR API layer that has been imported into your Unity project. This struct contains metadata parsed from the layer's JSON manifest file. The OpenXR runtime processes API layers in order to provide debugging, validation, or performance analysis capabilities.

    Examples

    This example shows how to check if a specific API layer is enabled: ApiLayersFeature apiLayersFeature = OpenXRSettings.Instance.GetFeature<ApiLayersFeature>(); if (apiLayersFeature != null) { foreach (ApiLayers.ApiLayer layer in apiLayersFeature.apiLayers.collection) { if (layer.isEnabled) { Debug.Log($"Layer {layer.name} is enabled for {layer.libraryArchitecture}"); } } }

    Properties

    apiVersion

    Gets the OpenXR API version supported by this layer.

    Declaration
    public string apiVersion { get; }
    Property Value
    Type Description
    string
    See Also
    ApiLayers
    ApiLayersFeature

    description

    Gets the description text for this API layer.

    Declaration
    public string description { get; }
    Property Value
    Type Description
    string
    See Also
    ApiLayers
    ApiLayersFeature

    implementationVersion

    Gets the implementation version of this API layer.

    Declaration
    public string implementationVersion { get; }
    Property Value
    Type Description
    string
    See Also
    ApiLayers
    ApiLayersFeature

    isEnabled

    Gets whether this API layer is enabled for use during runtime. An enabled layer will be included in the build and configured for the OpenXR loader.

    Declaration
    public bool isEnabled { get; }
    Property Value
    Type Description
    bool
    See Also
    ApiLayers
    ApiLayersFeature

    libraryArchitecture

    Gets the architecture for this API layer's library file.

    Declaration
    public Architecture libraryArchitecture { get; }
    Property Value
    Type Description
    Architecture
    See Also
    ApiLayers
    ApiLayersFeature

    libraryPath

    Gets the relative path to the API layer library file (e.g., a .dll or .so file).

    Declaration
    public string libraryPath { get; }
    Property Value
    Type Description
    string
    See Also
    ApiLayers
    ApiLayersFeature

    name

    Gets the display name of this API layer, as specified in its manifest.

    Declaration
    public string name { get; }
    Property Value
    Type Description
    string
    See Also
    ApiLayers
    ApiLayersFeature

    See Also

    ApiLayers
    ApiLayersFeature
    In This Article
    Back to top
    Copyright © 2026 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)