Skip to content

Conversation

@chrisyarbrough
Copy link
Owner

The bug arose due to the confusion:

  • On macOS, Unity Hub returns the path to Unity.app (the bundle), but we need to append the sub-path to the binary Unity.app/Contents/MacOS/Unity)
  • On Windows, Unity Hub returns the path to Unity.exe, which can be executed directly.

UnityHub.GetEditorPath was using platformSupport.RelativeEditorPathToExecutable to append to the path on mac correctly, but incorrectly on Windows, but PlatformSupport.FindInstallationRoot was using the relative path correctly to convert from Unity.exe to the root.

To clear up the confusion, I introduced FindInstallationRoot as a platform-specific method and also introduced GetUnityExecutablePath to append the mac-part only on mac.

The goal is to keep assumptions about each platform within each respective Windows/MacSupport class.

@chrisyarbrough chrisyarbrough self-assigned this Jan 26, 2026
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