Class VisionOS
Runtime scripting API for VisionOS.
Inherited Members
Namespace: UnityEngine.XR.VisionOS
Assembly: Unity.XR.VisionOS.dll
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 |
---|---|
bool | 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 |
---|---|
bool | true if the app is running in the visionOS Simulator. Otherwise, false. |
SetDepthRange(float, float)
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 |
---|---|---|
float | near | The value for the near clipping plane. |
float | far | The value for the far clipping plane. |