docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IReferenceImageFileDescriptor

    Describes and builds reference image file names and validates them against an expected pattern.

    Namespace: UnityEngine.TestTools.Graphics
    Assembly: UnityEngine.TestTools.Graphics.dll
    Syntax
    public interface IReferenceImageFileDescriptor

    Properties

    Extension

    Gets the file extension.

    Declaration
    ImageExtension Extension { get; }
    Property Value
    Type Description
    ImageExtension

    Format

    Gets the texture format associated with the reference image.

    Declaration
    TextureFormat Format { get; }
    Property Value
    Type Description
    TextureFormat

    Root

    Gets the root part of the file name (stem without variant or extension).

    Declaration
    string Root { get; }
    Property Value
    Type Description
    string

    VariantBase

    Gets the configured base for the variant (for example "0" for integers).

    Declaration
    string VariantBase { get; }
    Property Value
    Type Description
    string

    Methods

    BuildDefaultName()

    Builds the default name stem without extension.

    Declaration
    string BuildDefaultName()
    Returns
    Type Description
    string

    The default stem.

    BuildVariant(int)

    Build the variant, using the variant at the specified index, starting from the provided base.

    Declaration
    string BuildVariant(int i)
    Parameters
    Type Name Description
    int i

    Index of the variant, starting from the base

    Returns
    Type Description
    string

    A variant name

    TryParse(string, string)

    Tries to validate and parse a filename against the expected root and extension.

    Declaration
    bool TryParse(string filename, string expectedRoot)
    Parameters
    Type Name Description
    string filename

    The filename to validate.

    string expectedRoot

    The expected root to match.

    Returns
    Type Description
    bool

    True if the filename matches the pattern and expected root; otherwise, false.

    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)