Struct CameraConfiguration | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct CameraConfiguration

    Contains information regarding the camera configuration. Different devices support different camera configurations. This includes the resolution of the image and may include framerate on some platforms.

    The camera image configuration affects the resolution of the image returned by .

    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: UnityEngine.XR.ARExtensions
    Syntax
    public struct CameraConfiguration : IEquatable<CameraConfiguration>

    Constructors

    CameraConfiguration(Vector2Int)

    Constructs a camera configuration without a framerate.

    Declaration
    public CameraConfiguration(Vector2Int resolution)
    Parameters
    Type Name Description
    Vector2Int resolution

    CameraConfiguration(Vector2Int, Int32)

    Constructs a camera configuration with a framerate.

    Declaration
    public CameraConfiguration(Vector2Int resolution, int framerate)
    Parameters
    Type Name Description
    Vector2Int resolution
    System.Int32 framerate

    The camera framerate. Throws ArgumentOutOfRangeException if framerate is less than or equal to zero.

    Properties

    framerate

    The framerate, if this camera configuration specifies one. On some platforms, different resolutions may affect the available framerate.

    Declaration
    public int ? framerate { get; }
    Property Value
    Type Description
    System.Nullable<System.Int32>

    height

    The height of the camera resolution

    Declaration
    public int height { get; }
    Property Value
    Type Description
    System.Int32

    resolution

    The camera resolution

    Declaration
    public Vector2Int resolution { get; }
    Property Value
    Type Description
    Vector2Int

    width

    The width of the camera resolution

    Declaration
    public int width { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)

    Equals(CameraConfiguration)

    Declaration
    public bool Equals(CameraConfiguration other)
    Parameters
    Type Name Description
    CameraConfiguration other
    Returns
    Type Description
    System.Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()

    ToString()

    Converts the configuration to a string, suitable for debug logging.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.ValueType.ToString()

    Operators

    Equality(CameraConfiguration, CameraConfiguration)

    Declaration
    public static bool operator ==(CameraConfiguration lhs, CameraConfiguration rhs)
    Parameters
    Type Name Description
    CameraConfiguration lhs
    CameraConfiguration rhs
    Returns
    Type Description
    System.Boolean

    Inequality(CameraConfiguration, CameraConfiguration)

    Declaration
    public static bool operator !=(CameraConfiguration lhs, CameraConfiguration rhs)
    Parameters
    Type Name Description
    CameraConfiguration lhs
    CameraConfiguration rhs
    Returns
    Type Description
    System.Boolean
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023