Class XRCameraSubsystem
Provides access to a device's camera.
Inheritance
Implements
Inherited Members
Namespace: UnityEngine.XR.ARSubsystems
Assembly: solution.dll
Syntax
public class XRCameraSubsystem : SubsystemWithProvider<XRCameraSubsystem, XRCameraSubsystemDescriptor, XRCameraSubsystem.Provider>, ISubsystem
Remarks
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.
Constructors
Name | Description |
---|---|
XRCameraSubsystem() | Construct the |
Properties
Name | Description |
---|---|
autoFocusEnabled | Get the current focus mode in use by the provider. |
autoFocusRequested | Get or set the focus mode for the camera. |
cameraMaterial | Get the material used by |
currentCamera | Gets the camera currently in use. |
currentConfiguration | The current camera configuration. |
currentLightEstimation | Returns the current light estimation mode in use by the provider. |
invertCulling | Set this to |
permissionGranted | Determines whether camera permission has been granted. |
requestedCamera | Get or set the requested camera (that is, the AnyCamera bits). |
requestedLightEstimation | Get or set the requested light estimation mode. |
Methods
Name | Description |
---|---|
GetConfigurations(Allocator) | Queries for the supported camera configurations. |
GetMaterialKeywords(out List<string>, out List<string>) | Get the enabled and disabled shader keywords for the material. |
GetTextureDescriptors(Allocator) | Gets the XRTextureDescriptors associated with the
current frame. The caller owns the returned |
OnBeforeBackgroundRender(int) | Method to be called on the render thread to handle any required platform-specific functionality immediately before rendering the camera background. This method will always be called on the render thread and should only be called by the code responsible for executing background rendering on mobile AR platforms. |
Register(XRCameraSubsystemCinfo) | Registers a camera subsystem implementation based on the given subsystem parameters. |
TryAcquireLatestCpuImage(out XRCpuImage) | Attempts to acquire the latest camera image. This provides direct access to the raw pixel data, as well as to utilities to convert to RGB and Grayscale formats. |
TryGetIntrinsics(out XRCameraIntrinsics) | Returns the camera intrinsics information. |
TryGetLatestFrame(XRCameraParams, out XRCameraFrame) | Get the latest frame from the provider. |
TryGetLatestImage(out XRCpuImage) | Attempts to acquire the latest camera image. This provides direct access to the raw pixel data, as well as to utilities to convert to RGB and Grayscale formats. This method is obsolete. Use TryAcquireLatestCpuImage(out XRCpuImage) instead. |