docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ARKitLockedCamera

    Represents a disposable locked configurable primary camera associated with the current session configuration. Use this object to configure advanced camera hardware properties.

    Implements
    IEquatable<ARKitLockedCamera>
    IDisposable
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    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
    requestedExposureMode

    currentFocusMode

    Get the current focus mode for the camera.

    Declaration
    public ARKitFocusMode currentFocusMode { get; }
    Property Value
    Type Description
    ARKitFocusMode
    See Also
    requestedFocusMode

    currentWhiteBalanceMode

    Get the current white balance mode for the camera device.

    Declaration
    public ARKitWhiteBalanceMode currentWhiteBalanceMode { get; }
    Property Value
    Type Description
    ARKitWhiteBalanceMode
    See Also
    requestedWhiteBalanceMode

    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
    currentExposureMode

    requestedFocusMode

    Get or set the requested focus mode for the camera.

    Declaration
    public ARKitFocusMode requestedFocusMode { get; set; }
    Property Value
    Type Description
    ARKitFocusMode
    See Also
    currentFocusMode

    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
    currentWhiteBalanceMode

    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 obj is an ARKitLockedCamera and it compares equal to this one using Equals(ARKitLockedCamera).

    Overrides
    ValueType.Equals(object)

    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
    ValueType.GetHashCode()

    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 rhs.

    ARKitLockedCamera? rhs

    The nullable ARKitLockedCamera to compare with lhs.

    Returns
    Type Description
    bool

    Returns true if any of these conditions are met: - lhs and rhs are both not null and their underlying pointers are equal. - lhs is null and rhs's underlying pointer is null. - rhs is null and lhs's underlying pointer is null. - Both lhs and rhs are null.

     Returns <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a> otherwise.
    
    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 rhs.

    ARKitLockedCamera rhs

    The ARKitLockedCamera to compare with lhs.

    Returns
    Type Description
    bool

    Returns true if lhs is equal to rhs using Equals(ARKitLockedCamera). Returns false otherwise.

    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 lockedCamera

    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 rhs.

    ARKitLockedCamera? rhs

    The native object to compare with lhs.

    Returns
    Type Description
    bool

    Returns false if any of these conditions are met: - lhs and rhs are both not null and their underlying pointers are equal. - lhs is null and rhs's underlying pointer is null. - rhs is null and lhs's underlying pointer is null. - Both lhs and rhs are null.

     Returns <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> otherwise.
    
    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 rhs.

    ARKitLockedCamera rhs

    The ARKitLockedCamera to compare with lhs.

    Returns
    Type Description
    bool

    Returns false if lhs is equal to rhs using Equals(ARKitLockedCamera). Returns true otherwise.

    Implements

    IEquatable<T>
    IDisposable
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)