Skip to content

Editor and test tools: tolerant image compare, backend scope, profile scene sync #1292

Open

Description

What

Three DoxReloaded editor and test helpers name no game type. DoxReloaded PR #1302's sweep for general-purpose code found them.

  1. Tolerant image comparison (GoldenImage). CountMismatches(Color32[] expected, Color32[] actual, int tolerance) counts pixels where any channel differs by more than the tolerance. CountEdgeTolerantMismatches also forgives an edge's peak pixel by a fraction of the edge's contrast, because rasterizers disagree there. Every golden-image test needs this.
  2. Scripting backend scope (ScriptingBackendScope). new ScriptingBackendScope(NamedBuildTarget, ScriptingImplementation) sets the backend and puts the old one back on Dispose, so an editor build script cannot leak an IL2CPP switch.
  3. Build profile scene sync (AutoSyncBuildProfileScenes, [InitializeOnLoad]). Keeps each build profile's scene list in step with the global list in Unity 6's Build Profiles.

Ask

Each as its own editor helper, or under one Editor/Build and Tests area. 1 fits beside RestorableGlobal's family of test conveniences; 2 is that pattern for PlayerSettings.

Evidence

Search of 3.7.2 Runtime/ and Editor/ for image mismatch helpers, ScriptingImplementation scopes and build-profile scene handling: none.

DISCLOSURE: LLM-GENERATED TEXT

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions