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 |
---|---|
ARKit |
See Also
currentFocusMode
Get the current focus mode for the camera.
Declaration
public ARKitFocusMode currentFocusMode { get; }
Property Value
Type | Description |
---|---|
ARKit |
See Also
currentWhiteBalanceMode
Get the current white balance mode for the camera device.
Declaration
public ARKitWhiteBalanceMode currentWhiteBalanceMode { get; }
Property Value
Type | Description |
---|---|
ARKit |
See Also
exposure
Get or set the current exposure of the camera.
Declaration
public ARKitExposure exposure { get; set; }
Property Value
Type | Description |
---|---|
ARKit |
exposureRange
Get the supported exposure range of the camera.
Declaration
public ARKitExposureRange exposureRange { get; }
Property Value
Type | Description |
---|---|
ARKit |
focus
Get or set the current focus of the camera.
Declaration
public ARKitFocus focus { get; set; }
Property Value
Type | Description |
---|---|
ARKit |
focusRange
Get the supported focus range of the camera.
Declaration
public ARKitFocusRange focusRange { get; }
Property Value
Type | Description |
---|---|
ARKit |
requestedExposureMode
Get or set the requested exposure mode for the camera.
Declaration
public ARKitExposureMode requestedExposureMode { get; set; }
Property Value
Type | Description |
---|---|
ARKit |
See Also
requestedFocusMode
Get or set the requested focus mode for the camera.
Declaration
public ARKitFocusMode requestedFocusMode { get; set; }
Property Value
Type | Description |
---|---|
ARKit |
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 |
---|---|
ARKit |
See Also
supportedExposureModes
Get the supported exposure modes for the camera.
Declaration
public ARKitExposureMode supportedExposureModes { get; }
Property Value
Type | Description |
---|---|
ARKit |
supportedFocusModes
Get the supported focus modes for the camera.
Declaration
public ARKitFocusMode supportedFocusModes { get; }
Property Value
Type | Description |
---|---|
ARKit |
supportedWhiteBalanceModes
Get the supported white balance modes for the camera.
Declaration
public ARKitWhiteBalanceMode supportedWhiteBalanceModes { get; }
Property Value
Type | Description |
---|---|
ARKit |
whiteBalance
Get or set the current white balance of the camera.
Declaration
public ARKitWhiteBalanceGains whiteBalance { get; set; }
Property Value
Type | Description |
---|---|
ARKit |
whiteBalanceRange
Get the supported white balance gain values.
Declaration
public ARKitWhiteBalanceRange whiteBalanceRange { get; }
Property Value
Type | Description |
---|---|
ARKit |
Methods
AsIntPtr()
Get the native pointer of [AVCaptureDevice] (https://developer.apple.com/documentation/avfoundation/avcapturedevice?language=objc).
Declaration
public IntPtr AsIntPtr()
Returns
Type | Description |
---|---|
Int |
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
Returns
Type | Description |
---|---|
bool | Returns true if |
Overrides
Equals(ARKitLockedCamera)
Tests for equality.
Declaration
public bool Equals(ARKitLockedCamera other)
Parameters
Type | Name | Description |
---|---|---|
ARKit |
other | The ARKit |
Returns
Type | Description |
---|---|
bool | Returns true if the underlying native pointers are the same. Returns false otherwise. |
Remarks
Two ARKit
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 ARKit |
Overrides
Operators
operator ==(ARKitLockedCamera?, ARKitLockedCamera?)
Tests for equality.
Declaration
public static bool operator ==(ARKitLockedCamera? lhs, ARKitLockedCamera? rhs)
Parameters
Type | Name | Description |
---|---|---|
ARKit |
lhs | The nullable |
ARKit |
rhs | The nullable |
Returns
Type | Description |
---|---|
bool | true if any of these conditions are met:
-
|
Remarks
This equality operator lets you compare an instance with null to determine whether its
native pointer is null
.
Examples
bool TestForNull(ARKitLockedCamera obj)
{
if (obj == null)
{
// obj.AsIntPtr() is IntPtr.Zero
}
}
operator ==(ARKitLockedCamera, ARKitLockedCamera)
Tests for equality. Equivalent to Equals(ARKit
Declaration
public static bool operator ==(ARKitLockedCamera lhs, ARKitLockedCamera rhs)
Parameters
Type | Name | Description |
---|---|---|
ARKit |
lhs | The instance to compare with |
ARKit |
rhs | The instance to compare with |
Returns
Type | Description |
---|---|
bool | true if |
explicit operator IntPtr(ARKitLockedCamera)
Casts an instance to its underlying native pointer.
Declaration
public static explicit operator IntPtr(ARKitLockedCamera lockedCamera)
Parameters
Type | Name | Description |
---|---|---|
ARKit |
lockedCamera | The instance to cast. |
Returns
Type | Description |
---|---|
Int |
The native pointer. |
operator !=(ARKitLockedCamera?, ARKitLockedCamera?)
Tests for inequality.
Declaration
public static bool operator !=(ARKitLockedCamera? lhs, ARKitLockedCamera? rhs)
Parameters
Type | Name | Description |
---|---|---|
ARKit |
lhs | The nullable |
ARKit |
rhs | The nullable |
Returns
Type | Description |
---|---|
bool | false if any of these conditions are met:
-
|
Remarks
This inequality operator lets you compare an instance with null to determine whether its
native pointer is null
.
Examples
bool TestForNull(ARKitLockedCamera obj)
{
if (obj != null)
{
// obj.AsIntPtr() is not IntPtr.Zero
}
}
operator !=(ARKitLockedCamera, ARKitLockedCamera)
Tests for inequality. Equivalent to the negation of Equals(ARKit
Declaration
public static bool operator !=(ARKitLockedCamera lhs, ARKitLockedCamera rhs)
Parameters
Type | Name | Description |
---|---|---|
ARKit |
lhs | The ARKit |
ARKit |
rhs | The ARKit |
Returns
Type | Description |
---|---|
bool | false if |