Skip to content

Commit e5e49bf

Browse files
committed
refactor: update package ID from justinpbarnett to coplaydev across codebase
1 parent e29859a commit e5e49bf

File tree

3 files changed

+4
-41
lines changed

3 files changed

+4
-41
lines changed

UnityMcpBridge/Editor/Helpers/McpPathResolver.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ private static bool IsDevelopmentMode()
9090
string manifestContent = File.ReadAllText(manifestPath);
9191
// Look specifically for our package dependency set to a file: URL
9292
// This avoids auto-enabling dev mode just because a repo exists elsewhere on disk
93-
if (manifestContent.IndexOf("\"com.justinpbarnett.unity-mcp\"", StringComparison.OrdinalIgnoreCase) >= 0)
93+
if (manifestContent.IndexOf("\"com.coplaydev.unity-mcp\"", StringComparison.OrdinalIgnoreCase) >= 0)
9494
{
95-
int idx = manifestContent.IndexOf("com.justinpbarnett.unity-mcp", StringComparison.OrdinalIgnoreCase);
95+
int idx = manifestContent.IndexOf("com.coplaydev.unity-mcp", StringComparison.OrdinalIgnoreCase);
9696
// Crude but effective: check for "file:" in the same line/value
9797
if (manifestContent.IndexOf("file:", idx, StringComparison.OrdinalIgnoreCase) >= 0
9898
&& manifestContent.IndexOf("\n", idx, StringComparison.OrdinalIgnoreCase) > manifestContent.IndexOf("file:", idx, StringComparison.OrdinalIgnoreCase))

UnityMcpBridge/Editor/Helpers/ServerPathResolver.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,24 +99,16 @@ public static bool TryFindEmbeddedServerSource(out string srcPath, bool warnOnLe
9999
return false;
100100
}
101101

102-
private static bool TryResolveWithinPackage(UnityEditor.PackageManager.PackageInfo p, out string srcPath, bool warnOnLegacyPackageId)
102+
private static bool TryResolveWithinPackage(UnityEditor.PackageManager.PackageInfo p, out string srcPath)
103103
{
104104
const string CurrentId = "com.coplaydev.unity-mcp";
105-
const string LegacyId = "com.justinpbarnett.unity-mcp";
106105

107106
srcPath = null;
108-
if (p == null || (p.name != CurrentId && p.name != LegacyId))
107+
if (p == null || p.name != CurrentId)
109108
{
110109
return false;
111110
}
112111

113-
if (warnOnLegacyPackageId && p.name == LegacyId)
114-
{
115-
Debug.LogWarning(
116-
"MCP for Unity: Detected legacy package id 'com.justinpbarnett.unity-mcp'. " +
117-
"Please update Packages/manifest.json to 'com.coplaydev.unity-mcp' to avoid future breakage.");
118-
}
119-
120112
string packagePath = p.resolvedPath;
121113

122114
// Preferred tilde folder (embedded but excluded from import)

UnityMcpBridge/Editor/Windows/MCPForUnityEditorWindow.cs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,35 +1169,6 @@ private string FindPackagePythonDirectory()
11691169
return McpPathResolver.FindPackagePythonDirectory(debugLogsEnabled);
11701170
}
11711171

1172-
private bool IsDevelopmentMode()
1173-
{
1174-
try
1175-
{
1176-
// Only treat as development if manifest explicitly references a local file path for the package
1177-
string manifestPath = Path.Combine(Application.dataPath, "..", "Packages", "manifest.json");
1178-
if (!File.Exists(manifestPath)) return false;
1179-
1180-
string manifestContent = File.ReadAllText(manifestPath);
1181-
// Look specifically for our package dependency set to a file: URL
1182-
// This avoids auto-enabling dev mode just because a repo exists elsewhere on disk
1183-
if (manifestContent.IndexOf("\"com.justinpbarnett.unity-mcp\"", StringComparison.OrdinalIgnoreCase) >= 0)
1184-
{
1185-
int idx = manifestContent.IndexOf("com.justinpbarnett.unity-mcp", StringComparison.OrdinalIgnoreCase);
1186-
// Crude but effective: check for "file:" in the same line/value
1187-
if (manifestContent.IndexOf("file:", idx, StringComparison.OrdinalIgnoreCase) >= 0
1188-
&& manifestContent.IndexOf("\n", idx, StringComparison.OrdinalIgnoreCase) > manifestContent.IndexOf("file:", idx, StringComparison.OrdinalIgnoreCase))
1189-
{
1190-
return true;
1191-
}
1192-
}
1193-
return false;
1194-
}
1195-
catch
1196-
{
1197-
return false;
1198-
}
1199-
}
1200-
12011172
private string ConfigureMcpClient(McpClient mcpClient)
12021173
{
12031174
try

0 commit comments

Comments
 (0)