docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ARLightEstimationData

    A structure for light estimation information provided by the AR device.

    Implements
    IEquatable<ARLightEstimationData>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.ARFoundation
    Assembly: Unity.XR.ARFoundation.dll
    Syntax
    public struct ARLightEstimationData : IEquatable<ARLightEstimationData>
    Remarks

    While you can request any of these simultaneously, support for each varies among devices. Some platforms might not be able to simultaneously provide all options, or it might depend on other features (for example, camera Facing Direction).

    Properties

    ambientSphericalHarmonics

    An estimation of the ambient scene lighting using spherical harmonics at the Level 2.

    Declaration
    public SphericalHarmonicsL2? ambientSphericalHarmonics { readonly get; set; }
    Property Value
    Type Description
    SphericalHarmonicsL2?
    Remarks

    ambientSphericalHarmonics can be null when light estimation is not enabled in the ARSession or a platform-specific error has occurred.

    averageBrightness

    An estimate for the average brightness in the scene. Use averageBrightness.HasValue to determine if this information is available.

    Declaration
    public float? averageBrightness { get; set; }
    Property Value
    Type Description
    float?
    Remarks

    averageBrightness can be null when light estimation is not enabled in the ARSession, or if a platform-specific error has occurred.

    averageColorTemperature

    An estimate for the average color temperature of the scene. Use averageColorTemperature.HasValue to determine if this information is available.

    Declaration
    public float? averageColorTemperature { readonly get; set; }
    Property Value
    Type Description
    float?
    Remarks

    averageColorTemperature can be null when light estimation is not enabled in the ARSession, if the platform does not support it, or if a platform-specific error has occurred.

    averageIntensityInLumens

    An estimate for the average intensity, in lumens, in the scene. Use averageIntensityInLumens.HasValue to determine if this information is available.

    Declaration
    public float? averageIntensityInLumens { get; set; }
    Property Value
    Type Description
    float?
    Remarks

    averageIntensityInLumens can be null when light estimation is not enabled in the ARSession, or if a platform-specific error has occurred.

    averageMainLightBrightness

    An estimate for the average brightness of the main light estimate in the scene. Use averageMainLightBrightness.HasValue to determine if this information is available.

    Declaration
    public float? averageMainLightBrightness { get; set; }
    Property Value
    Type Description
    float?
    Remarks

    averageMainLightBrightness can be null when light estimation is not enabled in the ARSession, or if a platform-specific error has occurred.

    colorCorrection

    The scaling factors used for color correction. The RGB scale factors are used to match the color of the light in the scene. The alpha channel value is platform-specific.

    Declaration
    public Color? colorCorrection { readonly get; set; }
    Property Value
    Type Description
    Color?
    Remarks

    colorCorrection can be null when light estimation is not enabled in the ARSession, if the platform does not support it, or if a platform-specific error has occurred.

    mainLightColor

    The estimated color of the main light.

    Declaration
    public Color? mainLightColor { readonly get; set; }
    Property Value
    Type Description
    Color?
    Remarks

    mainLightColor can be null when light estimation is not enabled in the ARSession or a platform-specific error has occurred.

    mainLightDirection

    An estimate of where the main light of the scene is coming from.

    Declaration
    public Vector3? mainLightDirection { readonly get; set; }
    Property Value
    Type Description
    Vector3?
    Remarks

    mainLightDirection can be null when light estimation is not enabled in the ARSession or a platform-specific error has occurred.

    mainLightIntensityLumens

    An estimate of the intensity of the main light in lumens.

    Declaration
    public float? mainLightIntensityLumens { readonly get; set; }
    Property Value
    Type Description
    float?
    Remarks

    mainLightIntensityLumens can be null when light estimation is not enabled in the ARSession or a platform-specific error has occurred.

    Methods

    Equals(object)

    Compares for equality.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    An object to compare against.

    Returns
    Type Description
    bool

    true if obj is an ARLightEstimationData and Equals(ARLightEstimationData) is also true. Otherwise, false.

    Overrides
    ValueType.Equals(object)

    Equals(ARLightEstimationData)

    Compares for equality.

    Declaration
    public bool Equals(ARLightEstimationData other)
    Parameters
    Type Name Description
    ARLightEstimationData other

    The other ARLightEstimationData to compare against.

    Returns
    Type Description
    bool

    true if the ARLightEstimationData represents the same object.

    GetHashCode()

    Generates a hash code suitable for use in HashSet and Dictionary.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash of the ARLightEstimationData.

    Overrides
    ValueType.GetHashCode()

    ToString()

    Generates a string representation of this ARLightEstimationData.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of this ARLightEstimationData.

    Overrides
    ValueType.ToString()

    Operators

    operator ==(ARLightEstimationData, ARLightEstimationData)

    Compares lhs and rhs for equality using Equals(ARLightEstimationData).

    Declaration
    public static bool operator ==(ARLightEstimationData lhs, ARLightEstimationData rhs)
    Parameters
    Type Name Description
    ARLightEstimationData lhs

    The left-hand-side ARLightEstimationData of the comparison.

    ARLightEstimationData rhs

    The right-hand-side ARLightEstimationData of the comparison.

    Returns
    Type Description
    bool

    true if lhs compares equal to rhs, false otherwise.

    operator !=(ARLightEstimationData, ARLightEstimationData)

    Compares lhs and rhs for inequality using Equals(ARLightEstimationData).

    Declaration
    public static bool operator !=(ARLightEstimationData lhs, ARLightEstimationData rhs)
    Parameters
    Type Name Description
    ARLightEstimationData lhs

    The left-hand-side ARLightEstimationData of the comparison.

    ARLightEstimationData rhs

    The right-hand-side ARLightEstimationData of the comparison.

    Returns
    Type Description
    bool

    false if lhs compares equal to rhs, true otherwise.

    Implements

    IEquatable<T>
    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)