docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ReferenceImageOptimizerBatch

    Headless entry point (invoked via -batchmode -executeMethod) that runs the ReferenceImageOptimizer across the currently open project's reference images to completion and then quits the editor. Used by the weekly "Import SRP Test Projects" Yamato job.

    Inheritance
    object
    ReferenceImageOptimizerBatch
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.TestTools.Graphics
    Assembly: UnityEditor.TestTools.Graphics.dll
    Syntax
    public static class ReferenceImageOptimizerBatch
    Remarks

    Do NOT combine this with -quit. The optimizer runs asynchronously and its main-thread continuations are pumped by update, which only runs while the editor stays alive - so -quit would tear the editor down before it finishes. This method quits the editor itself via Exit(int) once optimization completes, and a watchdog guarantees a stalled run can never hang CI.

    Methods

    Run()

    Optimizes every reference image in the open project, then exits the editor (0 on success, 1 on failure or timeout).

    Declaration
    public static void Run()
    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)