Struct ARKitLockedCamera
Represents a disposable locked configurable primary camera associated with the current session configuration. Use this object to configure advanced camera hardware properties.
Inherited Members
Namespace: UnityEngine.XR.ARKit
Assembly: Unity.XR.ARKit.dll
Syntax
public struct ARKitLockedCamera : IEquatable<ARKitLockedCamera>, IDisposable
Properties
currentExposureMode
Get the current exposure mode for the camera.
Declaration
public ARKitExposureMode currentExposureMode { get; }
Property Value
Type | Description |
---|---|
ARKitExposureMode |
See Also
currentFocusMode
Get the current focus mode for the camera.
Declaration
public ARKitFocusMode currentFocusMode { get; }
Property Value
Type | Description |
---|---|
ARKitFocusMode |
See Also
currentWhiteBalanceMode
Get the current white balance mode for the camera device.
Declaration
public ARKitWhiteBalanceMode currentWhiteBalanceMode { get; }
Property Value
Type | Description |
---|---|
ARKitWhiteBalanceMode |
See Also
exposure
Get or set the current exposure of the camera.
Declaration
public ARKitExposure exposure { get; set; }
Property Value
Type | Description |
---|---|
ARKitExposure |
exposureRange
Get the supported exposure range of the camera.
Declaration
public ARKitExposureRange exposureRange { get; }
Property Value
Type | Description |
---|---|
ARKitExposureRange |
focus
Get or set the current focus of the camera.
Declaration
public ARKitFocus focus { get; set; }
Property Value
Type | Description |
---|---|
ARKitFocus |
focusRange
Get the supported focus range of the camera.
Declaration
public ARKitFocusRange focusRange { get; }
Property Value
Type | Description |
---|---|
ARKitFocusRange |
requestedExposureMode
Get or set the requested exposure mode for the camera.
Declaration
public ARKitExposureMode requestedExposureMode { get; set; }
Property Value
Type | Description |
---|---|
ARKitExposureMode |
See Also
requestedFocusMode
Get or set the requested focus mode for the camera.
Declaration
public ARKitFocusMode requestedFocusMode { get; set; }
Property Value
Type | Description |
---|---|
ARKitFocusMode |
See Also
requestedWhiteBalanceMode
Get or set the requested white balance mode for the camera device.
Declaration
public ARKitWhiteBalanceMode requestedWhiteBalanceMode { get; set; }
Property Value
Type | Description |
---|---|
ARKitWhiteBalanceMode |
See Also
supportedExposureModes
Get the supported exposure modes for the camera.
Declaration
public ARKitExposureMode supportedExposureModes { get; }
Property Value
Type | Description |
---|---|
ARKitExposureMode |
supportedFocusModes
Get the supported focus modes for the camera.
Declaration
public ARKitFocusMode supportedFocusModes { get; }
Property Value
Type | Description |
---|---|
ARKitFocusMode |
supportedWhiteBalanceModes
Get the supported white balance modes for the camera.
Declaration
public ARKitWhiteBalanceMode supportedWhiteBalanceModes { get; }
Property Value
Type | Description |
---|---|
ARKitWhiteBalanceMode |
whiteBalance
Get or set the current white balance of the camera.
Declaration
public ARKitWhiteBalanceGains whiteBalance { get; set; }
Property Value
Type | Description |
---|---|
ARKitWhiteBalanceGains |
whiteBalanceRange
Get the supported white balance gain values.
Declaration
public ARKitWhiteBalanceRange whiteBalanceRange { get; }
Property Value
Type | Description |
---|---|
ARKitWhiteBalanceRange |
Methods
AsIntPtr()
Get the native pointer of [AVCaptureDevice] (https://developer.apple.com/documentation/avfoundation/avcapturedevice?language=objc).
Declaration
public IntPtr AsIntPtr()
Returns
Type | Description |
---|---|
IntPtr | Returns the native pointer of [AVCaptureDevice] (https://developer.apple.com/documentation/avfoundation/avcapturedevice?language=objc). |
Dispose()
Releases the lock on the native camera device. For more information, see ARKit's AVCaptureDevice.unlockForConfiguration.
Declaration
public void Dispose()
Equals(object)
Tests for equality.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | An object to compare against. |
Returns
Type | Description |
---|---|
bool | Returns true if |
Overrides
Equals(ARKitLockedCamera)
Tests for equality.
Declaration
public bool Equals(ARKitLockedCamera other)
Parameters
Type | Name | Description |
---|---|---|
ARKitLockedCamera | other | The ARKitLockedCamera to compare against. |
Returns
Type | Description |
---|---|
bool | Returns true if the underlying native pointers are the same. Returns false otherwise. |
Remarks
Two ARKitLockedCameras are considered equal if their underlying pointers are equal.
GetHashCode()
Generates a hash code suitable for use with a HashSet
or Dictionary
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | Returns a hash code for this ARKitLockedCamera. |
Overrides
Operators
operator ==(ARKitLockedCamera?, ARKitLockedCamera?)
Tests for equality.
Declaration
public static bool operator ==(ARKitLockedCamera? lhs, ARKitLockedCamera? rhs)
Parameters
Type | Name | Description |
---|---|---|
ARKitLockedCamera? | lhs | The nullable ARKitLockedCamera to compare with |
ARKitLockedCamera? | rhs | The nullable ARKitLockedCamera to compare with |
Returns
Type | Description |
---|---|
bool | Returns true if any of these conditions are met:
-
|
Remarks
This equality operator lets you to compare an ARKitLockedCamera with null to determine whether its
underlying pointer is null. This allows for a more natural comparison with the native ARKit camera object:
bool TestForNull(ARKitLockedCamera obj)
{
if (obj == null)
{
// obj.AsIntPtr() is IntPtr.Zero
}
}
operator ==(ARKitLockedCamera, ARKitLockedCamera)
Tests for equality. Same as Equals(ARKitLockedCamera).
Declaration
public static bool operator ==(ARKitLockedCamera lhs, ARKitLockedCamera rhs)
Parameters
Type | Name | Description |
---|---|---|
ARKitLockedCamera | lhs | The ARKitLockedCamera to compare with |
ARKitLockedCamera | rhs | The ARKitLockedCamera to compare with |
Returns
Type | Description |
---|---|
bool | Returns true if |
explicit operator IntPtr(ARKitLockedCamera)
Casts an ARKitLockedCamera to its underlying native pointer.
Declaration
public static explicit operator IntPtr(ARKitLockedCamera lockedCamera)
Parameters
Type | Name | Description |
---|---|---|
ARKitLockedCamera | lockedCamera | The ARKitLockedCamera to cast. |
Returns
Type | Description |
---|---|
IntPtr | Returns the underlying native pointer for |
operator !=(ARKitLockedCamera?, ARKitLockedCamera?)
Tests for inequality.
Declaration
public static bool operator !=(ARKitLockedCamera? lhs, ARKitLockedCamera? rhs)
Parameters
Type | Name | Description |
---|---|---|
ARKitLockedCamera? | lhs | The native object to compare with |
ARKitLockedCamera? | rhs | The native object to compare with |
Returns
Type | Description |
---|---|
bool | Returns false if any of these conditions are met:
-
|
Remarks
This inequality operator lets you to compare an ARKitLockedCamera with null to determine whether its
underlying pointer is null. This allows for a more natural comparison with the native ARKit camera object:
bool TestForNull(ARKitLockedCamera obj)
{
if (obj != null)
{
// obj.AsIntPtr() is not IntPtr.Zero
}
}
operator !=(ARKitLockedCamera, ARKitLockedCamera)
Tests for inequality. Same as the negation of Equals(ARKitLockedCamera).
Declaration
public static bool operator !=(ARKitLockedCamera lhs, ARKitLockedCamera rhs)
Parameters
Type | Name | Description |
---|---|---|
ARKitLockedCamera | lhs | The ARKitLockedCamera to compare with |
ARKitLockedCamera | rhs | The ARKitLockedCamera to compare with |
Returns
Type | Description |
---|---|
bool | Returns false if |