docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ImageAssert.ImageComparisonResults

    Represents the results from an image comparison operation.

    Implements
    IEquatable<ImageAssert.ImageComparisonResults>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.TestTools.Graphics
    Assembly: UnityEngine.TestTools.Graphics.dll
    Syntax
    public struct ImageAssert.ImageComparisonResults : IEquatable<ImageAssert.ImageComparisonResults>

    Properties

    AverageDeltaE

    The average delta E value from the image comparison.

    Declaration
    public float AverageDeltaE { readonly get; set; }
    Property Value
    Type Description
    float

    AverageDeltaEWithinThreshold

    Gets or sets whether the average deltaE is within threshold. Only meaningful when Evaluated includes AverageDeltaE.

    Declaration
    public bool AverageDeltaEWithinThreshold { readonly get; set; }
    Property Value
    Type Description
    bool

    BadPixelsCount

    The ratio of bad pixels to all compared pixels.

    Declaration
    public float BadPixelsCount { readonly get; set; }
    Property Value
    Type Description
    float

    BadPixelsCountWithinThreshold

    Gets or sets whether the bad pixel ratio is within threshold. Only meaningful when Evaluated includes BadPixelsCount.

    Declaration
    public bool BadPixelsCountWithinThreshold { readonly get; set; }
    Property Value
    Type Description
    bool

    Evaluated

    The statistics this comparison evaluated against their thresholds. A statistic absent from this set took no part in Success: its within-threshold flag carries no information, and its value may not have been computed.

    Declaration
    public ImageAssert.ComparisonStatistics Evaluated { readonly get; init; }
    Property Value
    Type Description
    ImageAssert.ComparisonStatistics

    MaxTileDeltaE

    The highest average deltaE found in any single tile. Zero when no tile was scored.

    Declaration
    public float MaxTileDeltaE { readonly get; init; }
    Property Value
    Type Description
    float

    MaxTileDeltaEWithinThreshold

    Indicates whether the highest tile deltaE is within threshold. Only meaningful when Evaluated includes MaxTileDeltaE.

    Declaration
    public bool MaxTileDeltaEWithinThreshold { readonly get; init; }
    Property Value
    Type Description
    bool

    Success

    Indicates whether the image comparison was successful.

    Declaration
    public bool Success { readonly get; init; }
    Property Value
    Type Description
    bool

    WorstTile

    The tile that produced MaxTileDeltaE, as an x-y tile coordinate with the origin at the bottom-left tile. When several tiles share the highest score, this is the one in the lowest row, then the lowest column. (-1, -1) when no tile was scored.

    Declaration
    public Vector2Int WorstTile { readonly get; init; }
    Property Value
    Type Description
    Vector2Int

    Methods

    Equals(object)

    Compares this instance with another object.

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

    The object to compare with.

    Returns
    Type Description
    bool

    True if the object is an instance of ImageAssert.ImageComparisonResults and is equal to this instance; otherwise, false.

    Overrides
    ValueType.Equals(object)

    Equals(ImageComparisonResults)

    Compares this instance with another instance of ImageAssert.ImageComparisonResults.

    Declaration
    public bool Equals(ImageAssert.ImageComparisonResults other)
    Parameters
    Type Name Description
    ImageAssert.ImageComparisonResults other

    The other instance to compare with.

    Returns
    Type Description
    bool

    True if the instances are equal; otherwise, false.

    GetHashCode()

    Generates a hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The hash code for this instance.

    Overrides
    ValueType.GetHashCode()

    Implements

    IEquatable<T>
    In This Article
    Back to top
    Copyright © 2026 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)