Class ARCameraManager
Manages the lifetime of the XRCameraSubsystem. Add one of these to a Camera in your scene
if you want camera texture and light estimation information to be available.
Inheritance
Namespace: UnityEngine.XR.ARFoundation
Syntax
public sealed class ARCameraManager : MonoBehaviour
Properties
focusMode
Get or set the CameraFocusMode to use on the camera
Declaration
public CameraFocusMode focusMode { get; set; }
Property Value
| Type | Description |
|---|---|
| CameraFocusMode |
lightEstimationMode
Get or set whether light estimation information be made available (if possible).
Declaration
public LightEstimationMode lightEstimationMode { get; set; }
Property Value
| Type | Description |
|---|---|
| LightEstimationMode |
permissionGranted
Determines whether camera permission has been granted.
Declaration
public bool permissionGranted { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
shaderName
Gets the name of the shader used in background rendering.
Declaration
public string shaderName { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
subsystem
Get the XRCameraSubsystem whose lifetime this component manages.
Declaration
public XRCameraSubsystem subsystem { get; }
Property Value
| Type | Description |
|---|---|
| XRCameraSubsystem |
Methods
TryGetIntrinsics(out XRCameraIntrinsics)
Tries the get camera intrinsics. Camera intrinsics refers to properties of a physical camera which may be useful when performing additional computer vision processing on the camera image.
Declaration
public bool TryGetIntrinsics(out XRCameraIntrinsics cameraIntrinsics)
Parameters
| Type | Name | Description |
|---|---|---|
| XRCameraIntrinsics | cameraIntrinsics | The camera intrinsics to populate. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
Events
frameReceived
An event which fires each time a new camera frame is received.
Declaration
public event Action<ARCameraFrameEventArgs> frameReceived
Event Type
| Type | Description |
|---|---|
| System.Action<ARCameraFrameEventArgs> |