docs.unity3d.com
    Show / Hide Table of Contents

    Class VisionOS

    Runtime scripting API for VisionOS.

    Inheritance
    Object
    VisionOS
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.XR.VisionOS
    Syntax
    public static class VisionOS

    Methods

    IsImmersiveSpaceReady()

    Determine whether the immersive space for the app is ready. Return true in the Editor for testing purposes.

    Declaration
    public static bool IsImmersiveSpaceReady()
    Returns
    Type Description
    Boolean

    true if the immersive space is ready (or in the Editor when targeting visionOS). Otherwise, false.

    IsSimulator()

    Determine whether the app is running in the visionOS simulator. Treat the Editor targeting visionOS as running in simulator.

    Declaration
    public static bool IsSimulator()
    Returns
    Type Description
    Boolean

    true if the app is running in the visionOS Simulator. Otherwise, false.

    SetDepthRange(Single, Single)

    Set the range of values used for depth sorting. These values should match Camera.nearClipPlane and Camera.farClipPlane

    Declaration
    public static void SetDepthRange(float near, float far)
    Parameters
    Type Name Description
    Single near

    The value for the near clipping plane.

    Single far

    The value for the far clipping plane.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023