fix(meta): replace hand-crafted placeholder GUIDs with random ones#12
Open
BadranRaza wants to merge 1 commit intoAnkleBreaker-Studio:mainfrom
Open
fix(meta): replace hand-crafted placeholder GUIDs with random ones#12BadranRaza wants to merge 1 commit intoAnkleBreaker-Studio:mainfrom
BadranRaza wants to merge 1 commit intoAnkleBreaker-Studio:mainfrom
Conversation
Three .meta files ship with hand-authored placeholder GUIDs composed of
a monotonic hex sequence rather than randomly-generated values:
Editor/MCPPrefsCommands.cs.meta 8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f
Editor/MCPConstraintCommands.cs.meta 3f6e7d8c9a1b2e5d4a6c8e9f0a2b3d5e
Editor/MCPProfilerCommands.cs.meta 3f7a2c8e19d04b6d8e5c1a9f4b3d7e2a
Under embedded install (Packages/), Unity's import pipeline tolerates
these. Under UPM git install (Library/PackageCache/), Unity 6 silently
fails to register the three .cs files. The result is cascading
CS0103 compile errors in files that reference the affected classes:
Library/PackageCache/com.anklebreaker.unity-mcp@<sha>/Editor/MCPBridgeServer.cs(1196,28):
error CS0103: The name 'MCPPrefsCommands' does not exist in the current context
Library/PackageCache/com.anklebreaker.unity-mcp@<sha>/Editor/MCPSelfTest.cs(1043,30):
error CS0103: The name 'MCPPrefsCommands' does not exist in the current context
(7 more lines in MCPBridgeServer.cs for the same class)
Reproduced on Unity 6000.3.10f1 (macOS) with a fresh UPM install
pinned to v2.27.0 — same source tree that compiles clean when
embedded compiled the three offending files in via the asmdef once
their metas were regenerated with random GUIDs. The other ~50 .cs
files in Editor/ have proper random GUIDs and were never affected.
Regenerate the three GUIDs with `openssl rand -hex 16`. This is the
minimal fix; no source-code or asmdef changes needed.
Note: since these are editor-only utility classes (no scene or
ScriptableObject references target them by GUID), changing the GUIDs
does not break any user project. Internal type-name references
(MCPPrefsCommands.GetEditorPref, etc.) are GUID-independent.
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.
Fixes #11.
Summary
Three
.cs.metafiles ship with obviously hand-typed placeholder GUIDs (monotonic hex sequences, no entropy) rather than randomly-generated Unity GUIDs. Under embedded install (Packages/) Unity's Asset DB tolerates them; under UPM git install (Library/PackageCache/) Unity 6 silently refuses to index the three associated.csfiles, cascading into 8+CS0103: The name 'X' does not exist in the current contextcompile errors. See #11 for the full diagnosis, reproduction on Unity6000.3.10f1, and counter-evidence ruling out source-code / asmdef / UMA causes.Fix
Regenerated the three GUIDs with
openssl rand -hex 16. That's the whole diff — 3 lines across 3 files:No source code, asmdef, namespace, or API changes.
Verification
Packages/manifest.jsonat this branch:Library/PackageCache/com.anklebreaker.unity-mcp@*so UPM re-resolved from scratch.Before the fix (same project, manifest pointing at
v2.27.0): the exact 8-error cascade reported in #11. After the fix: clean.Safety
These three classes (
MCPPrefsCommands,MCPConstraintCommands,MCPProfilerCommands) are pure editor-side command handlers reached by CLR type name fromMCPBridgeServerandMCPSelfTestin the same assembly. No scene / prefab / ScriptableObject / CustomEditor references target them by GUID, so regenerating the GUIDs cannot break any user project or internal reference.Scanned all 71
.metafiles in the repo; only these three had the monotonic-hex pattern, so the fix is complete — no other suspicious GUIDs to clean up.Related (follow-up, not this PR)
Editor/AnkleBreaker.UnityMCP.Editor.asmdefunconditionally referencesUMA_Core/UMA_Core_Editoreven thoughMCPUMACommands.csis#if UMA_INSTALLED-guarded. Harmless today (Unity warns, doesn't error, when those assemblies are missing), but cleaner to split into a child asmdef with"defineConstraints": ["UMA_INSTALLED"]. Happy to send as a separate PR if you're interested — kept it out of this diff to keep the fix surgical.