docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class EuclideanDistanceSettings

    Settings for the Euclidean distance algorithm, including the maximum acceptable distance between two images.

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

    Constructors

    EuclideanDistanceSettings(float)

    Creates Euclidean distance settings and ensures MaximumDistance is valid.

    Declaration
    public EuclideanDistanceSettings(float maximumDistance)
    Parameters
    Type Name Description
    float maximumDistance

    Maximum acceptable Euclidean distance. Must be non-negative.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when maximumDistance is negative.

    Properties

    MaximumDistance

    Maximum acceptable Euclidean distance. If the average distance between two images exceeds this value, the comparison is considered a failure. A value of 0 means identical images are required.

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

    Implements

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