1. Spatial Reality Display Unity API Reference

Spatial Reality Display Unity API Reference

Table of Contents

This document is the reference for the public runtime API of the Spatial Reality Display plugin for Unity.
It is organized by namespace and type and covers APIs intended for application development.
Public APIs not intended for direct application use are intentionally omitted.
Readers are expected to already be familiar with the developer guide and basic plugin behavior.

Namespace: SRD.Core

Classes

SRDManager

Inherits from: UnityEngine.MonoBehaviour > SRDManagerBase

Description
Core component of the Spatial Reality Display plugin that manages rendering to the Spatial Reality Display and communication with the Spatial Reality Runtime for ELF-SR1/ELF-SR2. It is currently fully supported on Windows x64 platforms only.

Inherited Members (from SRDManagerBase)

Fields/Properties

API

Summary

IsSRRenderingActive

Controls whether SR rendering is active.

IsSpatialClippingActive

Controls whether spatial clipping is active.

IsHighImageQualityMode

Controls whether high-image-quality rendering is active.

IsAutoConnectEnabled

Enables automatic connection during initialization.

IsConnectionActive

Indicates whether a manager connection is currently active.

SRDViewSpaceScale

Scale value applied to Spatial Reality Display view space.

Presence

Transform of the presence in the real world.

DisplayEdges

Positions of the Spatial Reality Display edges and center.

Methods

API

Summary

ConnectAsync()

Starts connection asynchronously.

Disconnect()

Disconnects the active Spatial Reality Display session.

GetRuntimeVersion(out string version)

Retrieves runtime version string.

GetDisplayVersion(out string version)

Retrieves display firmware version string.

RestartHeadTracking()

Restarts head tracking process.

IsHeadTrackingActive(out bool active)

Queries whether head tracking is currently active.

Events

API

Summary

OnSRDManagerReadyEvent

Invoked when initialization is complete and the manager connection is active.

OnSRDViewSpaceScaleChangedEvent

Invoked when SRDViewSpaceScale changes.

OnFaceTrackStateEvent

Invoked every frame with the current face-tracking state.

Fields/Properties

IsCrosstalkCorrectionActive

Declaration
public bool IsCrosstalkCorrectionActive

Type

Description

bool

Controls whether crosstalk correction is active.

CrosstalkCorrectionType

Declaration
public SrdXrCrosstalkCorrectionType CrosstalkCorrectionType

Type

Description

SrdXrCrosstalkCorrectionType

Crosstalk correction mode.

IsWallmountMode

Declaration
public bool IsWallmountMode

Type

Description

bool

Enables wallmount mode. When enabled, the gizmo is tilted by 45 degrees.

ScalingMode

Declaration
public enum ScalingMode

Name

Description

ScaledSize

Scales the presence transform using the display body-bounds scale factor and draws the gizmo at the configured display-view size.

OriginalSize

Uses the physical panel dimensions selected for the gizmo.

_scalingMode

Declaration
public ScalingMode _scalingMode

Type

Description

ScalingMode

Selects the scaling mode for the manager presence and display gizmo.

SRD2DView

Declaration
public SRD2DView SRD2DView

Type

Description

SRD2DView

SRD2DView instance used to access the 2D view window API.

Methods

ShowCameraWindow

Shows or hides the camera window.

Declaration
public bool ShowCameraWindow(bool isOn)

Parameters

Name

Type

Description

isOn

bool

True to open the camera window; false to close it.

Returns

Type

Description

bool

True if the operation succeeded.

GetRealityCreationLevel

Retrieves the current reality creation level.

Declaration
public bool GetRealityCreationLevel(out int level)

Parameters

Name

Type

Description

level

out int

Reality creation level.

Returns

Type

Description

bool

True if the operation succeeded.

SetRealityCreationLevel

Sets the reality creation level.

Declaration
public bool SetRealityCreationLevel(int level)

Parameters

Name

Type

Description

level

int

Reality creation level.

Returns

Type

Description

bool

True if the operation succeeded.

GetSensorRangeMode

Retrieves the current sensor range mode.

Declaration
public bool GetSensorRangeMode(out int mode)

Parameters

Name

Type

Description

mode

out int

Sensor range mode.

Returns

Type

Description

bool

True if the operation succeeded.

SetSensorRangeMode

Sets the sensor range mode.

Declaration
public bool SetSensorRangeMode(int mode)

Parameters

Name

Type

Description

mode

int

Sensor range mode.

Returns

Type

Description

bool

True if the operation succeeded.

GetXtalkAdjustParam

Retrieves the current crosstalk adjustment parameter.

Declaration
public bool GetXtalkAdjustParam(out int param)

Parameters

Name

Type

Description

param

out int

Crosstalk adjustment parameter.

Returns

Type

Description

bool

True if the operation succeeded.

SetXtalkAdjustParam

Sets the crosstalk adjustment parameter.

Declaration
public bool SetXtalkAdjustParam(int param)

Parameters

Name

Type

Description

param

int

Crosstalk adjustment parameter.

Returns

Type

Description

bool

True if the operation succeeded.

Init2DView

Creates a resizable window on the second monitor to render a 2D view of the SRD screen.

Declaration
public bool Init2DView()

Returns

Type

Description

bool

True if the 2D view window was created successfully. Fails if no secondary monitor is connected to the computer.

Use the SRD2DView object to access the 2D view API.

PortraitSRDManager

Inherits from: UnityEngine.MonoBehaviour > SRDManagerBase

Description
Core component of the Spatial Reality Display plugin that manages rendering to the Spatial Reality Display and communication with the Spatial Reality Runtime for ELF-MN1. On Windows, it can also be used (with limited API support) to preview portrait-mode 1080x2160 (1:2) content on the 16:9 screen of ELF-SR1/ELF-SR2.

Inherited Members (from SRDManagerBase)

Fields/Properties

API

Summary

IsSRRenderingActive

Controls whether SR rendering is active.

IsSpatialClippingActive

Controls whether spatial clipping is active.

IsHighImageQualityMode

Controls whether high-image-quality rendering is active.

IsAutoConnectEnabled

Enables automatic connection during initialization.

IsConnectionActive

Indicates whether a manager connection is currently active.

SRDViewSpaceScale

Scale value applied to Spatial Reality Display view space.

Presence

Transform of the presence in the real world.

DisplayEdges

Positions of the Spatial Reality Display edges and center.

Methods

API

Summary

ConnectAsync()

Starts connection asynchronously.

Disconnect()

Disconnects the active Spatial Reality Display session.

GetRuntimeVersion(out string version)

Retrieves runtime version string.

GetDisplayVersion(out string version)

Retrieves display firmware version string.

RestartHeadTracking()

Restarts head tracking process.

IsHeadTrackingActive(out bool active)

Queries whether head tracking is currently active.

Events

API

Summary

OnSRDManagerReadyEvent

Invoked when initialization is complete and the manager connection is active.

OnSRDViewSpaceScaleChangedEvent

Invoked when SRDViewSpaceScale changes.

OnFaceTrackStateEvent

Invoked every frame with the current face-tracking state.

Fields/Properties

IdleTexture

Declaration
public Texture2D IdleTexture

Type

Description

Texture2D

Texture displayed while the manager is idle or disconnected.

EFMSettings

Declaration
public SRDEasyFusionMaskSettings EFMSettings

Type

Description

SRDEasyFusionMaskSettings

Easy Fusion Mask settings.

Methods

GetDisplayBrightness

Retrieves the current display brightness.

Declaration
public bool GetDisplayBrightness(out uint brightness)

Parameters

Name

Type

Description

brightness

out uint

Display brightness level.

Returns

Type

Description

bool

True if the operation succeeded.

SetDisplayBrightness

Sets the display brightness.

Declaration
public bool SetDisplayBrightness(uint brightness)

Parameters

Name

Type

Description

brightness

uint

Brightness level.

Returns

Type

Description

bool

True if the operation succeeded.

GetSpeakerVolume

Retrieves the current speaker volume.

Declaration
public bool GetSpeakerVolume(out uint volume)

Parameters

Name

Type

Description

volume

out uint

Speaker volume level.

Returns

Type

Description

bool

True if the operation succeeded.

SetSpeakerVolume

Sets the speaker volume.

Declaration
public bool SetSpeakerVolume(uint volume)

Parameters

Name

Type

Description

volume

uint

Speaker volume level.

Returns

Type

Description

bool

True if the operation succeeded.

GetScreenDisplayMode

Retrieves the current screen display mode.

Declaration
public bool GetScreenDisplayMode(out SRDScreenDisplayMode mode)

Parameters

Name

Type

Description

mode

out SRDScreenDisplayMode

Display mode.

Returns

Type

Description

bool

True if the operation succeeded.

SetScreenDisplayMode

Sets the screen display mode.

Declaration
public bool SetScreenDisplayMode(SRDScreenDisplayMode mode)

Parameters

Name

Type

Description

mode

SRDScreenDisplayMode

Display mode.

Returns

Type

Description

bool

True if the operation succeeded.

SetIOSAutoLaunchApplicationName

Sets the name of the application that iOS launches automatically when the display starts.

Declaration
public bool SetIOSAutoLaunchApplicationName(string applicationName)

Parameters

Name

Type

Description

applicationName

string

Application name to launch.

Returns

Type

Description

bool

True if the setting is applied successfully; otherwise, false.

This method is intended for iOS builds.

Events

OnSRDSpeakerVolumeChangedEvent

Declaration
public SRDSpeakerVolumeChangedEvent OnSRDSpeakerVolumeChangedEvent

Type

Description

SRDSpeakerVolumeChangedEvent

Invoked when a physical volume button is pressed.

Event Parameters

Name

Type

Description

volume

uint

Speaker volume value.

SRDManagerBase

Inherits from: UnityEngine.MonoBehaviour / Inherited by: SRDManager, PortraitSRDManager

Description
Core base class of the Spatial Reality Display plugin shared by SRDManager and PortraitSRDManager. Defines common connection and rendering lifecycle behavior. It cannot be instantiated.

Fields/Properties

IsSRRenderingActive

Declaration
public bool IsSRRenderingActive

Type

Description

bool

Controls whether SR rendering is active.

IsSpatialClippingActive

Declaration
public bool IsSpatialClippingActive

Type

Description

bool

Controls whether spatial clipping is active.

IsHighImageQualityMode

Declaration
public bool IsHighImageQualityMode

Type

Description

bool

Enables lens-shift rendering when supported; otherwise the renderer uses homography.

IsAutoConnectEnabled

Declaration
public bool IsAutoConnectEnabled

Type

Description

bool

Enables automatic connection during initialization.

IsConnectionActive

Declaration
public bool IsConnectionActive

Type

Description

bool

Indicates whether a manager connection is currently active.

SRDViewSpaceScale

Declaration
public float SRDViewSpaceScale

Type

Description

float

Scale value applied to Spatial Reality Display view space.

Presence

Declaration
public Transform Presence

Type

Description

Transform

Transform of the presence in the real world.

DisplayEdges

Declaration
public DisplayEdges DisplayEdges

Type

Description

DisplayEdges

Positions of the Spatial Reality Display edges and center.

Methods

ConnectAsync

Initializes the manager if needed and starts a connection to the Spatial Reality Display asynchronously.

Declaration
public Task<bool> ConnectAsync()

Returns

Type

Description

Task

Connection result.

Disconnect

Stops rendering and disconnects this manager from the Spatial Reality Display.

Declaration
public bool Disconnect()

Returns

Type

Description

bool

True if the operation succeeded.

GetRuntimeVersion

Retrieves the current runtime version string.

Declaration
public bool GetRuntimeVersion(out string version)

Parameters

Name

Type

Description

version

out string

Runtime version.

Returns

Type

Description

bool

True if the operation succeeded.

GetDisplayVersion

Retrieves the connected display firmware version string.

Declaration
public bool GetDisplayVersion(out string version)

Parameters

Name

Type

Description

version

out string

Display firmware version.

Returns

Type

Description

bool

True if the operation succeeded.

RestartHeadTracking

Restarts the head tracking process.

Declaration
public bool RestartHeadTracking()

Returns

Type

Description

bool

True if the operation succeeded.

IsHeadTrackingActive

Queries whether head tracking is currently active.

Declaration
public bool IsHeadTrackingActive(out bool active)

Parameters

Name

Type

Description

active

out bool

Head tracking active state.

Returns

Type

Description

bool

True if the operation succeeded.

Events

OnSRDManagerReadyEvent

Declaration
public SRDManagerReadyEvent OnSRDManagerReadyEvent

Type

Description

SRDManagerReadyEvent

Invoked when initialization is complete and the manager connection is active.

This event has no parameters.

OnSRDViewSpaceScaleChangedEvent

Declaration
public SRDViewSpaceScaleChangedEvent OnSRDViewSpaceScaleChangedEvent

Type

Description

SRDViewSpaceScaleChangedEvent

Invoked when SRDViewSpaceScale (Spatial Reality Display View Space Scale) changes.

Event Parameters

Name

Type

Description

scale

float

Updated SRDViewSpaceScale value.

OnFaceTrackStateEvent

Declaration
public SRDFaceTrackStateEvent OnFaceTrackStateEvent

Type

Description

SRDFaceTrackStateEvent

Invoked every frame with the current face-tracking state.

Event Parameters

Name

Type

Description

isSuccess

bool

Whether face tracking succeeded in the current frame.

SRD2DView

Inherits from: UnityEngine.MonoBehaviour

Description
Controls the 2D View window shown on another display.

Fields/Properties

SourceTexture

Declaration
public SRDTextureType SourceTexture

Type

Description

SRDTextureType

Texture type currently displayed.

CustomTexture

Declaration
public RenderTexture CustomTexture

Type

Description

RenderTexture

Texture shown when SourceTexture is Custom.

IsFullScreen

Declaration
public bool IsFullScreen

Type

Description

bool

Whether 2D View is full screen.

IsVisible

Declaration
public bool IsVisible

Type

Description

bool

Whether 2D View is visible.

DisplayIndex

Declaration
public static int DisplayIndex

Type

Description

static int

Display index associated with 2D View.

Methods

SetSourceTexture

Sets the source texture type used for the 2D View.

Declaration
public void SetSourceTexture(SRDTextureType sourceTexture)

Parameters

Name

Type

Description

sourceTexture

SRDTextureType

Texture type to display.

Show

Shows or hides the 2D View.

Declaration
public void Show(bool show)

Parameters

Name

Type

Description

show

bool

True to show, false to hide.

SetTargetDisplay

Sets the target display for the 2D View.

Declaration
public bool SetTargetDisplay(DisplayInfo targetDisplay)

Parameters

Name

Type

Description

targetDisplay

DisplayInfo

Target display info.

Returns

Type

Description

bool

True if the operation succeeded.

SetFullScreen

Sets full screen mode for the 2D View.

Declaration
public bool SetFullScreen(bool fullScreen)

Parameters

Name

Type

Description

fullScreen

bool

True for full screen, false for windowed.

Returns

Type

Description

bool

True if the operation succeeded.

SRDCameras

Description
Provides access to the Camera components attached to the Spatial Reality Display manager, as well as coordinate conversion helpers between rendering screen space, Spatial Reality Display screen space, and world space.

Fields/Properties

WatcherAnchorObject

Declaration
public GameObject WatcherAnchorObject

Type

Description

GameObject

Anchor object for head position visualization.

AnchorTransform

Declaration
public Transform AnchorTransform

Type

Description

Transform

Transform of watcher anchor.

WatcherCameraObject

Declaration
public GameObject WatcherCameraObject

Type

Description

GameObject

Camera object used for raycasting.

WatcherCamera

Declaration
public Camera WatcherCamera

Type

Description

Camera

Camera used for raycasting and UI interactions.

LeftEyeCamera

Declaration
public Camera LeftEyeCamera

Type

Description

Camera

Eye camera for left-eye rendering.

RightEyeCamera

Declaration
public Camera RightEyeCamera

Type

Description

Camera

Eye camera for right-eye rendering.

Methods

SRDCameras

Creates an SRDCameras instance bound to the given manager.

Declaration
public SRDCameras(SRDManagerBase manager)

Parameters

Name

Type

Description

manager

SRDManagerBase

Spatial Reality Display manager in the current scene.

Returns

Type

Description

constructor

New SRDCameras instance.

ScreenPointToRay

Converts a screen-space position to a world-space ray.

Declaration
public Ray ScreenPointToRay(Vector2 positionInScreen)

Parameters

Name

Type

Description

positionInScreen

Vector2

Position in screen coordinates.

Returns

Type

Description

Ray

Ray from viewer through the given screen point.

ScreenToWorldPoint

Converts a screen-space position to a world-space position.

Declaration
public Vector3 ScreenToWorldPoint(Vector2 positionInScreen)

Parameters

Name

Type

Description

positionInScreen

Vector2

Position in screen coordinates.

Returns

Type

Description

Vector3

Vector3 world-space position.

WorldToSRDScreenPoint

Converts a world-space position to Spatial Reality Display screen space.

Declaration
public Vector2 WorldToSRDScreenPoint(Vector3 positionInWorld)

Parameters

Name

Type

Description

positionInWorld

Vector3

Position in world coordinates.

Returns

Type

Description

Vector2

Vector2 in Spatial Reality Display screen coordinates.

ScreenToSRDScreen

Converts rendering screen coordinates to Spatial Reality Display screen coordinates.

Declaration
public Vector2 ScreenToSRDScreen(Vector2 positionInScreen)

Parameters

Name

Type

Description

positionInScreen

Vector2

Position in rendering screen coordinates.

Returns

Type

Description

Vector2

Vector2 in Spatial Reality Display screen coordinates.

SRDScreenToScreen

Converts Spatial Reality Display screen coordinates to rendering screen coordinates.

Declaration
public Vector2 SRDScreenToScreen(Vector2 positionInSRDScreen)

Parameters

Name

Type

Description

positionInSRDScreen

Vector2

Position in Spatial Reality Display screen coordinates.

Returns

Type

Description

Vector2

Vector2 in rendering screen coordinates.

Enums

SrdXrCrosstalkCorrectionType

Description
Crosstalk correction mode.

Values

Name

Description

GRADATION_CORRECTION_MEDIUM

Gradation correction medium mode.

GRADATION_CORRECTION_ALL

Gradation correction all mode.

GRADATION_CORRECTION_HIGH_PRECISE

High-precision gradation correction mode.

SRDTextureType

Description
Texture sources for the 2D View window.

Values

Name

Description

LeftEye

Displays the left-eye texture.

RightEye

Displays the right-eye texture.

SideBySide

Displays side-by-side texture output.

Custom

Displays SRD2DView.CustomTexture.

SRDScreenDisplayMode

Description
Screen display modes.

Values

Name

Description

Normal

Normal display output.

BlackScreen

Black screen output.

SonyLogo

Sony logo screen output.

SRDEasyFusionMaskMode

Description
Easy Fusion Mask source modes.

Values

Name

Description

SingleColor

Uses a single color mask.

Texture

Uses a texture mask.

RawImage

Uses a RawImage source.

Plane

Uses a plane object as mask source.

Structs

SRDEasyFusionMaskFrameSize

Description
Frame margins used by Easy Fusion Mask.

Fields

Name

Type

Description

left

int

Left frame size.

top

int

Top frame size.

right

int

Right frame size.

bottom

int

Bottom frame size.

SRDEasyFusionMaskSettings

Description
Settings for Easy Fusion Mask.

Fields

Name

Type

Description

Enabled

bool

Enables or disables Easy Fusion Mask.

Mode

SRDEasyFusionMaskMode

Mask rendering mode.

BaseColor

Color

Base color used by SingleColor mode.

Texture

Texture

Texture source used by Texture mode.

RawImage

RawImage

RawImage source used by RawImage mode.

Plane

GameObject

Plane source used by Plane mode.

FrameSize

SRDEasyFusionMaskFrameSize

Mask frame margins.

SlopeGain

float

Slope gain adjustment value.

LevelOffset

float

Level offset adjustment value.

Namespace: SRD.Utils

Classes

SRDApplicationContext

Description
Provides static access to the detected-device count and Spatial Reality Display error notifications.

Fields/Properties

ConnectedDeviceCount

Declaration
public static uint ConnectedDeviceCount

Type

Description

static uint

Number of Spatial Reality Display devices detected by the system.

Methods

AddDeviceConnectionEventListener

Registers a listener for detected-device count changes.

Declaration
public static void AddDeviceConnectionEventListener(UnityAction<uint> callback)

Parameters

Name

Type

Description

callback

UnityAction

Listener invoked with the current count when registered and whenever the count changes.

RemoveDeviceConnectionEventListener

Unregisters a listener for detected-device count changes.

Declaration
public static void RemoveDeviceConnectionEventListener(UnityAction<uint> callback)

Parameters

Name

Type

Description

callback

UnityAction

Listener to remove.

AddSRDErrorOccurredEventListener

Registers a listener for Spatial Reality Display error notifications.

Declaration
public static void AddSRDErrorOccurredEventListener(UnityAction<SRDApplicationContext.SRDErrorType> callback)

Parameters

Name

Type

Description

callback

UnityAction<SRDErrorType>

Listener invoked when a Spatial Reality Display error is published.

RemoveSRDErrorOccurredEventListener

Unregisters a listener for Spatial Reality Display error notifications.

Declaration
public static void RemoveSRDErrorOccurredEventListener(UnityAction<SRDApplicationContext.SRDErrorType> callback)

Parameters

Name

Type

Description

callback

UnityAction<SRDErrorType>

Listener to remove.

SRDProjectSettings

Inherits from: UnityEngine.ScriptableObject

Description
Stores project settings for Spatial Reality Display behavior.

Fields/Properties

RunWithoutSpatialRealityDisplay

Declaration
public bool RunWithoutSpatialRealityDisplay

Type

Description

bool

Enables running without a connected Spatial Reality Display.

BehaviorWhenNoSRDisplay

Declaration
public BehaviorOptionWhenNoSRDisplay BehaviorWhenNoSRDisplay

Type

Description

BehaviorOptionWhenNoSRDisplay

Behavior selected when no display is connected. Run-without-display mode overrides this setting.

MultiDisplayMode

Declaration
public MultiSRDMode MultiDisplayMode

Type

Description

MultiSRDMode

Multi-display layout supported by the application. Run-without-display mode forces single-display mode.

NumberOfDisplays

Declaration
public int NumberOfDisplays

Type

Description

int

Number of displays configured for the application. The effective count is 1 in single-display mode.

PositionChangeTime

Declaration
public float PositionChangeTime

Type

Description

float

Interval in seconds between display-position switches in Editor Play mode.

Methods

IsRunWithoutSRDisplayMode

Queries whether run-without-device mode is enabled.

Declaration
public static bool IsRunWithoutSRDisplayMode()

Returns

Type

Description

bool

True when running without Spatial Reality Display is enabled.

GetBehaviorOptionWhenNoSRDisplay

Retrieves the configured behavior when no display is connected.

Declaration
public static BehaviorOptionWhenNoSRDisplay GetBehaviorOptionWhenNoSRDisplay()

Returns

Type

Description

BehaviorOptionWhenNoSRDisplay

Configured BehaviorOptionWhenNoSRDisplay value.

GetMutlipleDisplayMode

Retrieves the effective multi-display mode. The API name retains the spelling used in the source.

Declaration
public static MultiSRDMode GetMutlipleDisplayMode()

Returns

Type

Description

MultiSRDMode

Effective MultiSRDMode value; single-display mode is returned when run-without-display mode is enabled.

GetNumberOfDevices

Retrieves the configured number of devices.

Declaration
public static int GetNumberOfDevices()

Returns

Type

Description

int

Effective display count; returns 1 when the effective layout is single-display.

GetPositionSwitchInterval

Retrieves the configured position switch interval.

Declaration
public static float GetPositionSwitchInterval()

Returns

Type

Description

float

Interval in seconds between display-position switches in Editor Play mode.

SRDGraphicRaycaster

Inherits from: UnityEngine.UI.GraphicRaycaster

Description
Raycasts pointer input through the tracked user's view onto world-space Canvas graphics. Assign a manager to _srdManager, or leave it unset to find a manager when the component starts.

Fields/Properties

_srdManager

Declaration
public SRDManager _srdManager

Type

Description

SRDManager

Manager used for camera and display-space coordinate conversion.

Events

OnCanvasHitEvent

Declaration
public SRDCanvasInteractionEvent OnCanvasHitEvent

Type

Description

SRDCanvasInteractionEvent

Invoked on each raycast while the ray intersects the Canvas.

Event Parameters

Name

Type

Description

rayOrigin

Vector3

Ray origin in world space.

srdScreenPos

Vector3

World-space point on the display plane corresponding to the pointer position.

canvasPos

Vector3

World-space hit position on the Canvas.

OnCanvasEnterEvent

Declaration
public SRDCanvasInteractionEvent OnCanvasEnterEvent

Type

Description

SRDCanvasInteractionEvent

Invoked when the ray first intersects the Canvas.

Event Parameters

Name

Type

Description

rayOrigin

Vector3

Ray origin in world space.

srdScreenPos

Vector3

World-space point on the display plane corresponding to the pointer position.

canvasPos

Vector3

World-space hit position on the Canvas.

OnCanvasExitEvent

Declaration
public SRDCanvasInteractionEvent OnCanvasExitEvent

Type

Description

SRDCanvasInteractionEvent

Invoked when the ray stops intersecting the Canvas; the Canvas position is the last hit position.

Event Parameters

Name

Type

Description

rayOrigin

Vector3

Ray origin in world space.

srdScreenPos

Vector3

World-space point on the display plane corresponding to the pointer position.

canvasPos

Vector3

Last world-space hit position on the Canvas.

DisplayEdges

Description
Represents the Spatial Reality Display corners and plane in world space.

Fields/Properties

LeftUp

Declaration
public Transform LeftUp

Type

Description

Transform

Top-left edge transform.

LeftBottom

Declaration
public Transform LeftBottom

Type

Description

Transform

Bottom-left edge transform.

RightUp

Declaration
public Transform RightUp

Type

Description

Transform

Top-right edge transform.

RightBottom

Declaration
public Transform RightBottom

Type

Description

Transform

Bottom-right edge transform.

CenterPosition

Declaration
public Vector3 CenterPosition

Type

Description

Vector3

Display center position.

Normal

Declaration
public Vector3 Normal

Type

Description

Vector3

Display-plane normal vector computed from the left and bottom edges.

Positions

Declaration
public Vector3[] Positions

Type

Description

Vector3[]

Corner positions in world space, ordered counterclockwise from LeftUp: LeftUp, LeftBottom, RightBottom, RightUp.

SRDAdaptivePerformanceController

Inherits from: UnityEngine.MonoBehaviour

Description
Runtime performance controller that adjusts dynamic buffer size and, in URP builds, render scale to keep frame rate near a target. Below the FPS threshold it reduces quality proportionally; when performance recovers it increases quality by the configured recovery steps.

Fields/Properties

TargetFPS

Declaration
public float TargetFPS

Type

Description

float

Target frame rate.

FpsDropThreshold

Declaration
public float FpsDropThreshold

Type

Description

float

FPS-to-target ratio below which buffer size and render scale are reduced.

FpsMeasurementWindowSeconds

Declaration
public float FpsMeasurementWindowSeconds

Type

Description

float

Duration in seconds of each FPS measurement window.

ControlBufferSize

Declaration
public bool ControlBufferSize

Type

Description

bool

Controls whether buffer-size control is enabled.

MinBufferSize

Declaration
public float MinBufferSize

Type

Description

float

Lower bound for buffer size.

MaxBufferSize

Declaration
public float MaxBufferSize

Type

Description

float

Upper bound for buffer size.

BufferSizeRecoveryStep

Declaration
public float BufferSizeRecoveryStep

Type

Description

float

Buffer-size increase applied after each measurement window when performance permits recovery.

ControlRenderScale

Declaration
public bool ControlRenderScale

Type

Description

bool

Controls URP render-scale adjustment. This field is available only in URP builds.

MinRenderScale

Declaration
public float MinRenderScale

Type

Description

float

Minimum URP render scale used when reducing quality.

MaxRenderScale

Declaration
public float MaxRenderScale

Type

Description

float

Maximum URP render scale; 1.0 represents native resolution.

RenderScaleRecoveryStep

Declaration
public float RenderScaleRecoveryStep

Type

Description

float

Render-scale increase applied after each measurement window when performance permits recovery.

CurrentFps

Declaration
public float CurrentFps

Type

Description

float

Most recently measured frames per second.

CurrentBufferSize

Declaration
public float CurrentBufferSize

Type

Description

float

Current dynamic buffer-size scale.

CurrentRenderScale

Declaration
public float CurrentRenderScale

Type

Description

float

Current URP render scale when an URP asset is active.

Enums

SRDApplicationContext.SRDErrorType

Description
Nested enum of SRDApplicationContext containing runtime error codes.

Values

Name

Description

ERROR_DEVICE_NOT_FOUND

Target device was not found.

ERROR_NOT_ALLOW_USB_CONNECTION

USB connection is not available.

ERROR_NOT_ALLOW_CAMERA

Camera access is not available.

ERROR_DEVICE_LOST

Connected device was lost during runtime.

ERROR_CONNECTION_LOST

Runtime connection was lost.

BehaviorOptionWhenNoSRDisplay

Description
Behavior when no Spatial Reality Display is connected.

Values

Name

Description

ExitWithError

Shows an error and exits.

RunWithDisabled

Runs with Spatial Reality Display manager disabled.

MultiSRDMode

Description
Multi-display layout modes.

Values

Name

Description

SingleDisplay

Single display or duplicated output mode.

MultiVertical

Vertical multi-display mode.

MultiHorizontal

Horizontal multi-display mode.

MultiGrid

Grid multi-display mode.

Developer Contact・
Commercial Use