Skip to content

Tests: skip incomplete Unity installations when probing for an editor#482

Merged
sailro merged 1 commit into
microsoft:mainfrom
Theorist100:skip-incomplete-unity-installations
Jul 18, 2026
Merged

Tests: skip incomplete Unity installations when probing for an editor#482
sailro merged 1 commit into
microsoft:mainfrom
Theorist100:skip-incomplete-unity-installations

Conversation

@Theorist100

Copy link
Copy Markdown
Contributor

On Windows, uninstall leftovers and stripped editors can remain under the Unity Hub folder with only a Resources subfolder (no Managed assemblies). UnityPath registers them as valid installations, and since installations are enumerated in descending order, such a folder can end up first: FirstInstallation() then points to a folder without managed assemblies and every test fails with missing UnityEngine/UnityEditor references.

Only register an installation if UnityEditor.dll is actually present, checking both the classic Managed layout and the macOS 6000.3+ Resources/Scripting/Managed layout (mirroring DiagnosticVerifier.UnityAssemblies()).

On Windows, uninstall leftovers and stripped editors can remain under the
Unity Hub folder with only a Resources subfolder. They register as valid
installations and sort first, so FirstInstallation() returns a folder
without managed assemblies and every test fails with missing references.

Only register an installation if UnityEditor.dll is present, checking both
the classic layout and the macOS 6000.3+ Resources/Scripting layout.
@Theorist100
Theorist100 requested a review from a team as a code owner July 17, 2026 15:55
@sailro
sailro merged commit 4302355 into microsoft:main Jul 18, 2026
6 checks passed
@sailro

sailro commented Jul 18, 2026

Copy link
Copy Markdown
Member

Thank you for this contribution !

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants