Experimental: this API is experimental and might be changed or removed in the future.

XRCameraSubsystem

class in UnityEngine.Experimental.XR

Cambiar al Manual

Descripción

Provides access to a device's camera.

The XRCameraSubsystem links a Unity Camera to a device camera for video overlay (pass-thru rendering). It also allows developers to query for environmental light estimation, when available.

Variables

CameraSet current Camera component within the app to be used by this XRCameraInstance.
LastUpdatedFrameThe frame during which the camera subsystem was last successfully updated.
LightEstimationRequestedTrue if the XRCameraSubsystem should try to provide light estimation.
MaterialSet current Material to be used while rendering to the render target.

Funciones Públicas

GetTexturesFills the provided texturesOut with the texture(s) associated with the XRCameraSubsystem.
TryGetAverageBrightnessProvides brightness for the whole image as an average of all pixels' brightness.
TryGetAverageColorTemperatureProvides color temperature for the whole image as an average of all pixels' color temperature.
TryGetDisplayMatrixProvides display matrix defining how texture is being rendered on the screen.
TryGetProjectionMatrixProvides projection matrix used by camera subsystem.
TryGetShaderNameProvides shader name used by Camera subsystem to render texture.
TryGetTimestampProvides timestamp.

Events

FrameReceivedEvent raised when a new camera frame is received.