NRSDKApiForUnity
Overview
Unity Namespace Reference
Unity.XR Namespace Reference
Unity.XR.XREAL Namespace Reference

Classes

struct  AndroidPermissionsRequestResult
 
class  AsyncTask< T >
 
class  AudioEncoder
 
struct  CameraParameters
 
struct  CameraTextureFrame
 
class  CaptureBehaviourBase
 
struct  CaptureTask
 
class  EditorFrameProvider
 
class  FrameBlender
 
class  FrameCaptureContext
 
class  FrameCaptureContextFactory
 
interface  IAndroidPermissionsCheck
 
interface  IEncoder
 
interface  IFloatingViewProxy
 
class  ImageEncoder
 
class  NativeEncodeConfig
 
class  NativeEncoder
 
class  NullDataFrameProvider
 
class  PhotoCaptureFrame
 
class  QuadPointerHandler
 
struct  RGBCameraDataFrame
 
class  RGBCameraFrameProvider
 
class  Singleton< T >
 
class  SingletonMonoBehaviour< T >
 
class  VideoEncoder
 
class  WaitForTaskCompletionYieldInstruction< T >
 
class  XREALAndroidPermissionsManager
 
class  XREALAudioCapture
 
class  XREALButton
 
class  XREALCameraInitializer
 
class  XREALCaptureBehaviour
 
class  XREALControllerLayout
 
class  XREALDefaultFloatingViewProxy
 
class  XREALDialogController
 
class  XREALDialogView
 
class  XREALFloatingViewProvider
 
class  XREALHomeMenu
 
class  XREALLocalizationTool
 
class  XREALMainThreadDispather
 
class  XREALMultiResumeMediator
 
class  XREALNativeErrorNotification
 
class  XREALNotification
 
class  XREALNotificationListener
 
class  XREALPhotoCapture
 
class  XREALRGBCameraTexture
 
class  XREALTrackingModeChangeListener
 
class  XREALTrackingTypeChangeMask
 
class  XREALVideoCapture
 
class  XREALVirtualController
 
class  XREALXRLoader
 

Enumerations

enum  NotTrackingReason {
  None , Initializing , Relocalizing , InsufficientLight ,
  InsufficientFeatures , ExcessiveMotion , Unsupported , CameraUnavailable
}
 
enum  TrackingState { None , Limited , Tracking }
 
enum  CodecType { Local = 0 , Rtmp = 1 , Rtp = 2 }
 
enum  RecorderIndex { REC_MIC = 0 , REC_APP = 1 }
 
enum  BlendMode { Blend , CameraOnly , VirtualOnly }
 
enum  CamMode { None = 0 , PhotoMode = 1 , VideoMode = 2 }
 
enum  CapturePixelFormat { BGRA32 = 0 , NV12 = 1 , JPEG = 2 , PNG = 3 }
 
enum  PhotoCaptureFileOutputFormat { PNG = 0 , JPG = 1 }
 
enum  CaptureResultType { Success = 0 , UnknownError = 1 }
 
enum  AudioState { MicAudio = 0 , ApplicationAudio = 1 , ApplicationAndMicAudio = 2 , None = 3 }
 
enum  XREALButtonType {
  None , TriggerButton , GripButton , PrimaryButton ,
  SecondaryButton , MenuButton , Primary2DAxis , Secondary2DAxis ,
  CustomButton0 , CustomButton1 , CustomButton2 , CustomButton3 ,
  CustomButton4 , CustomButton5 , CustomButton6 , CustomButton7 ,
  CustomButton8 , CustomButton9
}
 
enum  PopupUIType { None , SpaceUI , ScreenUI }
 

Functions

delegate void CaptureTaskCallback (CaptureTask task, byte[] data)
 
delegate void AudioDataCallBack (IntPtr data, UInt32 size)
 
delegate void RGBCameraDataCallback (RGBCameraDataFrame rgbCameraData, IntPtr userData)
 
delegate void XREALErrorCallback (XREALErrorCode errorCode, string message)
 
delegate void XREALGlassesEventCallback (GlassesEventData data)
 
delegate void XREALGlassesKeyClickCallback (XREALClickType actionType, XREALKeyType keyType)
 
delegate void XREALGlassesKeyStateCallback (XREALKeyType keyType, XREALKeyState state)
 
delegate void XREALGlassesDisconnectCallback (XREALGlassesDisconnectReason reason)
 
delegate void XREALGlassesVolumeCallback (uint volume)
 
delegate void XREALGlassesRGBCameraPlugStateCallback (XREALRGBCameraPlugState state)
 
delegate void XREALGlassesECLevelCallback (uint level)
 
delegate void XREALGlassesWearingStateCallback (XREALWearingStatus state)
 
delegate void XREALGlassesBrightnessCallback (uint brightness)
 
delegate void XREALGlassesTemperatureLevelCallback (XREALTemperatureLevel level)
 

Enumeration Type Documentation

◆ AudioState

Specifies what audio sources should be recorded while recording the video.

Enumerator
MicAudio 

Only include the mic audio in the video recording.

ApplicationAudio 

Only include the application audio in the video recording.

None 

Do not include any audio in the video recording.

◆ BlendMode

Enumerator
Blend 

Blend the virtual image and camera image.

CameraOnly 

Only camera image.

VirtualOnly 

Only virtual image.

◆ CamMode

The camera mode of capture.

Enumerator
None 

Resource is not in use.

PhotoMode 

Resource is in Photo Mode.

VideoMode 

Resource is in Video Mode.

◆ CapturePixelFormat

The encoded image or video pixel format to use for PhotoCapture and VideoCapture.

Enumerator
BGRA32 

8 bits per channel (blue, green, red, and alpha).

NV12 

8-bit Y plane followed by an interleaved U/V plane with 2x2 subsampling.

JPEG 

Encode photo in JPEG format.

PNG 

Portable Network Graphics Format.

◆ CaptureResultType

Contains the result of the capture request.

Enumerator
Success 

Specifies that the desired operation was successful.

UnknownError 

Specifies that an unknown error occurred.

◆ CodecType

Values that represent codec types.

Enumerator
Local 

An enum constant representing the local option.

Rtmp 

An enum constant representing the rtmp option.

Rtp 

An enum constant representing the rtp option.

◆ NotTrackingReason

Represents the reason tracking was lost.

Enumerator
None 

Tracking is working normally.

Initializing 

Tracking is being initialized.

Relocalizing 

Tracking is resuming after an interruption.

InsufficientLight 

Tracking was lost due to poor lighting conditions.

InsufficientFeatures 

Tracking was lost due to insufficient visual features.

ExcessiveMotion 

Tracking was lost due to excessive motion.

Unsupported 

Tracking lost reason is not supported.

CameraUnavailable 

The camera is in use by another application. Tracking can resume once the app regains access to the camera.

◆ PhotoCaptureFileOutputFormat

Image Encoding Format.

Enumerator
PNG 

PNG Encoding.

JPG 

JPEG Encoding.

◆ PopupUIType

Enum representing the type of popup UI, indicating whether the popup appears on the phone screen or the glasses screen.

Enumerator
None 

No popup UI type specified.

SpaceUI 

Popup UI that appears in the 3D space (glasses screen).

ScreenUI 

Popup UI that appears on the phone screen.

◆ RecorderIndex

Values that represent record type index.

Enumerator
REC_MIC 

Recorder index of mic.

REC_APP 

Recorder index of application.

◆ TrackingState

Represents pose tracking quality. Can apply to a device or trackables it is tracking in the environment.

Enumerator
None 

Not tracking.

Limited 

Some tracking information is available, but it is limited or of poor quality.

Tracking 

Tracking is working normally.

◆ XREALButtonType

An enum representing different types of buttons for the XREAL controller. It includes standard buttons like Trigger, Grip, and Menu buttons, as well as custom and 2D axis buttons.

Enumerator
None 

No button pressed or an undefined state.

TriggerButton 

The trigger button, typically used for selecting actions.

GripButton 

The grip button, often used for grabbing or holding objects.

PrimaryButton 

The primary action button, usually mapped to "A" or "X" on the controller.

SecondaryButton 

The secondary action button, typically mapped to "B" or "Y" on the controller.

MenuButton 

The menu button, generally used for opening in-game menus or system settings.

Primary2DAxis 

The primary 2D axis input, often linked to the touchpad.

Secondary2DAxis 

The secondary 2D axis input.

Function Documentation

◆ AudioDataCallBack()

delegate void Unity.XR.XREAL.AudioDataCallBack ( IntPtr data,
UInt32 size )

Callback, called when audio data is sampled.

Parameters
dataThe sampled audio data.
sizeThe size of the audio data.

◆ CaptureTaskCallback()

delegate void Unity.XR.XREAL.CaptureTaskCallback ( CaptureTask task,
byte[] data )

Callback, called when the capture task.

Parameters
taskThe task.
dataThe data.

◆ RGBCameraDataCallback()

delegate void Unity.XR.XREAL.RGBCameraDataCallback ( RGBCameraDataFrame rgbCameraData,
IntPtr userData )

Delegate for handling RGB camera data callbacks.

Parameters
rgbCameraDataThe data frame from the RGB camera.
userDataA user-defined pointer for additional data.

◆ XREALErrorCallback()

delegate void Unity.XR.XREAL.XREALErrorCallback ( XREALErrorCode errorCode,
string message )

Delegate for handling errors from the XREAL plugin.

Parameters
errorCodeThe error code indicating the type of error.
messageOptional error message providing additional context or details.

◆ XREALGlassesBrightnessCallback()

delegate void Unity.XR.XREAL.XREALGlassesBrightnessCallback ( uint brightness)

Delegate for handling changes in the brightness level of XREAL glasses.

Parameters
brightnessThe current brightness level.

◆ XREALGlassesDisconnectCallback()

delegate void Unity.XR.XREAL.XREALGlassesDisconnectCallback ( XREALGlassesDisconnectReason reason)

Delegate for handling glasses disconnection events.

Parameters
reasonThe reason for the disconnection.

◆ XREALGlassesECLevelCallback()

delegate void Unity.XR.XREAL.XREALGlassesECLevelCallback ( uint level)

Delegate for handling changes in the electro chromic level of XREAL glasses.

Parameters
levelThe current electrochromic level.

◆ XREALGlassesEventCallback()

delegate void Unity.XR.XREAL.XREALGlassesEventCallback ( GlassesEventData data)

Delegate for handling generic glasses events.

Parameters
dataThe data associated with the glasses event.

◆ XREALGlassesKeyClickCallback()

delegate void Unity.XR.XREAL.XREALGlassesKeyClickCallback ( XREALClickType actionType,
XREALKeyType keyType )

Delegate for handling key click events on XREAL glasses.

Parameters
actionTypeThe type of click action.
keyTypeThe type of key that was clicked.

◆ XREALGlassesKeyStateCallback()

delegate void Unity.XR.XREAL.XREALGlassesKeyStateCallback ( XREALKeyType keyType,
XREALKeyState state )

Delegate for handling key state changes on XREAL glasses.

Parameters
keyTypeThe type of key whose state has changed.
stateThe new state of the key.

◆ XREALGlassesRGBCameraPlugStateCallback()

delegate void Unity.XR.XREAL.XREALGlassesRGBCameraPlugStateCallback ( XREALRGBCameraPlugState state)

Delegate for handling RGB camera plug/unplug state changes.

Parameters
stateThe current state of the RGB camera.

◆ XREALGlassesTemperatureLevelCallback()

delegate void Unity.XR.XREAL.XREALGlassesTemperatureLevelCallback ( XREALTemperatureLevel level)

Delegate for handling changes in the temperature level of XREAL glasses.

Parameters
levelThe current temperature level.

◆ XREALGlassesVolumeCallback()

delegate void Unity.XR.XREAL.XREALGlassesVolumeCallback ( uint volume)

Delegate for handling volume change events on XREAL glasses.

Parameters
volumeThe new volume level.

◆ XREALGlassesWearingStateCallback()

delegate void Unity.XR.XREAL.XREALGlassesWearingStateCallback ( XREALWearingStatus state)

Delegate for handling changes in the wearing state of XREAL glasses.

Parameters
stateThe current wearing status.