mcp-unity icon indicating copy to clipboard operation
mcp-unity copied to clipboard

False positive when detecting multiplayer play mode clone instance

Open kginstructor opened this issue 9 months ago • 3 comments

In the Editor\Utils\McpUtils.cs, line ~842

if (libraryPath.Contains("VP") && libraryPath.Contains("Library"))

Gives false positive if the path has those strings anywhere in them, which means if you have a project folder called "MyProjectMVP" or "CountyLibraryApp" it will now return true. Suggested fix is something like:

if ((libraryPath.Contains("/VP/") || libraryPath.Contains("\\VP\\")) && (libraryPath.Contains("/Library/") || libraryPath.Contains("\\Library\\"))

kginstructor avatar Feb 20 '26 20:02 kginstructor

This is a good report. Thank you, will push a fix soon

CoderGamester avatar Feb 21 '26 20:02 CoderGamester

I pushed a new fix for this issue. @kginstructor can you confirm that fixed in your end?

CoderGamester avatar Feb 21 '26 21:02 CoderGamester

That fixed it, thank you!

kginstructor avatar Mar 03 '26 20:03 kginstructor