docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LegacyColorDifferenceAggregate

    Represents aggregated results of all the pixels when comparing two images using the legacy color difference algorithm (delta E, alpha, gamma).

    Inheritance
    object
    LegacyColorDifferenceAggregate
    Implements
    ITextureComparisonResult
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.TestTools.Graphics.LegacyColorDifference
    Assembly: UnityEngine.TestTools.Graphics.dll
    Syntax
    public class LegacyColorDifferenceAggregate : ITextureComparisonResult

    Constructors

    LegacyColorDifferenceAggregate(Color32[], float, float, PixelEvaluationGuide)

    Instantiate a LegacyColorDifferenceAggregateResult with aggregation difference values

    Declaration
    public LegacyColorDifferenceAggregate(Color32[] differencePixels, float badPixelsAverage, float sumOverThresholdAverage, PixelEvaluationGuide evaluationGuide)
    Parameters
    Type Name Description
    Color32[] differencePixels

    A collection of pixels representing the difference between two images

    float badPixelsAverage

    Average of pixels that are considered bad based on threshold

    float sumOverThresholdAverage

    How much each pixel are above threshold in average

    PixelEvaluationGuide evaluationGuide

    The thresholds and tests used to measure the image differences

    Properties

    DifferencePixels

    Gets a collection of pixels that represents the difference between two images by using the biggest delta as the value for the RGB channels

    Declaration
    public Color32[] DifferencePixels { get; }
    Property Value
    Type Description
    Color32[]

    ImageComparisonResults

    Also the comparison results. This is kept for backward compatibility with the old ImageAssert.ImageComparisonResults

    Declaration
    public ImageAssert.ImageComparisonResults ImageComparisonResults { get; }
    Property Value
    Type Description
    ImageAssert.ImageComparisonResults

    Methods

    ToString()

    Texts that describe the comparison result

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    Text with a describing the result

    Overrides
    object.ToString()

    Implements

    ITextureComparisonResult
    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)