fix: Linux editor discovery + Unity 6000.5 EntityId compat#2
Merged
Merged
Conversation
|
@erasmus74 is attempting to deploy a commit to the mflrevan's projects Team on Vercel. A member of the Team first needs to authorize it. |
CLI: Add Linux editor install root discovery The unity_install_roots() function only had Windows-specific paths guarded by #[cfg(windows)], so on Linux it returned an empty Vec and UCP could never find any installed Unity editors. Added #[cfg(unix)] block that searches: - ~/Unity/Hub/Editor/ - ~/.local/share/Unity/Hub/Editor/ - ~/.unityhub/Editor/ - /opt/Unity/Hub/Editor/ - /usr/local/Unity/Hub/Editor/ - XDG_CONFIG_HOME/unityhub/secondaryInstallPath.json - ~/.config/unityhub/secondaryInstallPath.json Also fixed read_hub_project_version() which was hardcoded to %APPDATA%/UnityHub/projects-v1.json (Windows-only). Extracted hub_projects_path() helper with platform-aware logic and fixed the project key matching (no backslash conversion on Linux). Bridge: Adapt to Unity 6000.5 deprecated API errors Unity 6000.5.0b11 elevated several obsolete APIs to compiler errors (CS0619): - Object.GetInstanceID() -> GetEntityId() - EditorUtility.InstanceIDToObject() -> EntityIdToObject() - EditorSettings.externalVersionControl -> VersionControlSettings.mode - SceneHandle implicit int conversion -> GetRawData() Updated UnityObjectCompat.cs with #if UNITY_6000_5_OR_NEWER guards using EntityId.ToULong/FromULong for lossless int round-tripping, and migrated all controller files and tests to use the compat layer.
5b6f82e to
e9f687b
Compare
mflRevan
added a commit
that referenced
this pull request
Jun 10, 2026
fix: add missing AssemblyInfo.cs.meta The Linux/6000.5 compat PR (#2) added Editor/AssemblyInfo.cs without a committed .meta file. Every other .cs in the package ships a tracked .meta, so without it Unity would generate a fresh random GUID on each UPM consumer, producing a spurious dirty diff. Add it to restore the repo convention. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> @
mflRevan
added a commit
that referenced
this pull request
Jun 10, 2026
The Linux/6000.5 compat PR (#2) added Editor/AssemblyInfo.cs without a committed .meta file. Every other .cs in the package ships a tracked .meta, so without it Unity would generate a fresh random GUID on each UPM consumer, producing a spurious dirty diff. Add it to restore the repo convention. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mflRevan
added a commit
that referenced
this pull request
Jun 10, 2026
…yId compat PR #2's EntityId work widened GetSceneHandle's return type to long and, in the pre-6000.5 (#else) branch, returned Scene.handle directly. On Unity 6000.0-6000.4 Scene.handle is a SceneHandle with implicit int and uint operators, so widening straight to long is ambiguous (CS0457) and the entire editor bridge failed to compile across the 6.0-6.4 support matrix. Pin the int conversion explicitly -- handles are 32-bit on these versions, so it is lossless. Validated by running the editmode suite on 6000.4.0f1 (compiles clean, tests pass). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes that were both needed to get
ucp connectworking on Linux with Unity 6000.5.0b11.1. CLI: Linux editor install root discovery
unity_install_roots()only had#[cfg(windows)]paths — on Linux it returned an emptyVec, so UCP could never locate any installed Unity editors regardless of where they were installed.Added
#[cfg(unix)]block searching standard Linux Unity Hub install locations:~/Unity/Hub/Editor/~/.local/share/Unity/Hub/Editor/~/.unityhub/Editor//opt/Unity/Hub/Editor//usr/local/Unity/Hub/Editor/secondaryInstallPath.jsonfrom~/.config/unityhub/Fixed
read_hub_project_version()which was hardcoded to%APPDATA%/UnityHub/projects-v1.json. Extracted ahub_projects_path()helper with platform-aware logic and fixed project key matching (no backslash conversion on Linux).2. Bridge: Unity 6000.5 deprecated API errors
Unity 6000.5.0b11 elevated several obsolete APIs to compiler errors (CS0619):
Object.GetInstanceID()GetEntityId()+EntityId.ToULong()EditorUtility.InstanceIDToObject(int)EditorUtility.EntityIdToObject(EntityId)EditorSettings.externalVersionControlVersionControlSettings.mode(int)SceneHandleSceneHandle.GetRawData()Updated
UnityObjectCompat.cswith#if UNITY_6000_5_OR_NEWERguards usingEntityId.ToULong/FromULongfor losslessintround-tripping. Migrated all 10 controller files, the compat layer, and tests to use the compat abstraction.Testing
ucp connectsuccessfully launches Unity 6000.5.0b11 on Linux (Ubuntu)ucp doctor— all checks passucp editor status— correctly lists all 4 installed editor versionsucp scene active— returns correct scene infoFiles changed
cli/src/editor_runtime.rs— Linux install roots + cross-platform hub config pathsunity-package/com.ucp.bridge/Editor/Compatibility/UnityObjectCompat.cs— EntityId compat layer