CoplayDev/unity-mcp · error · EditorNotFound
No Unity editor binary found. Searched:\n
Error message
No Unity editor binary found. Searched:\n
What it means
Raised by LocalLauncher.resolve_editor when resolve_version(project_path) returned an empty value, so the harness cannot even begin searching for an editor binary. Because no version was resolved, the searched list is empty and __str__ prints 'No Unity editor binary found. Searched:\n ' with no paths.
Source
Thrown at tools/local_harness.py:752
class Handle:
"""A live editor handle. Exactly one of (proc, container) is meaningful."""
proc: Any = None # subprocess.Popen for LocalLauncher
container: str | None = None # container name for DockerLauncher
log_path: str | None = None
pid: int | None = None
class LocalLauncher:
"""Boots a native Hub editor via detached Popen; PID-based liveness."""
def __init__(self, args: argparse.Namespace):
self.args = args
def resolve_editor(self, project_path: Path) -> EditorSpec:
version = self.args.unity_version or resolve_version(project_path)
if not version:
raise EditorNotFound(searched=[])
return discover_editor(version, explicit_editor=self.args.editor)
@staticmethod
def warmup_argv(editor: str, project_path: Path, log_path: Path) -> list[str]:
return [
editor, "-batchmode", "-nographics", "-quit",
"-projectPath", str(project_path),
"-logFile", str(log_path),
]
@staticmethod
def resident_argv(editor: str, project_path: Path, log_path: Path,
extra_editor_args: list[str]) -> list[str]:
return [
editor, "-batchmode", "-nographics",
"-projectPath", str(project_path),
"-logFile", str(log_path),
*list(extra_editor_args or []),View on GitHub (pinned to c21bf496bc)
Solutions
- Point --project-path at a real Unity project that contains ProjectSettings/ProjectVersion.txt.
- Pass --unity-version 2022.3.0f1 explicitly to bypass ProjectVersion.txt parsing.
- If the project is new, open it once in Unity Hub so ProjectVersion.txt is written.
Example fix
# before python tools/local_harness.py --project-path /tmp/empty-folder # no ProjectVersion.txt # after python tools/local_harness.py --project-path TestProjects/UnityMCPTests --unity-version 2022.3.0f1
Defensive patterns
Strategy: validation
Validate before calling
version = args.unity_version or resolve_version(project_path)
if not version:
raise SystemExit(f'{project_path} has no ProjectVersion.txt; pass --unity-version') Type guard
def has_project_version(p: pathlib.Path) -> bool:
return (p / 'ProjectSettings' / 'ProjectVersion.txt').exists() Try / catch
from tools.local_harness import EditorNotFound
try:
spec = launcher.resolve_editor(project_path)
except EditorNotFound as e:
if not e.searched:
print('No version resolved; pass --unity-version'); sys.exit(5)
raise Prevention
- Point --project-path at a real Unity project
- Pass --unity-version to bypass ProjectVersion.txt
- Open new projects once in Hub to write ProjectVersion.txt
When it happens
Trigger: resolve_version reads ProjectSettings/ProjectVersion.txt and finds no m_EditorVersion: line (or the file is missing/empty), so version is falsy and resolve_editor raises EditorNotFound(searched=[]) at local_harness.py:749-750.
Common situations: The --project-path points at a folder that is not a Unity project (no ProjectSettings/ProjectVersion.txt); the file is corrupted/empty; a fresh project template was not initialized by Unity yet.
Related errors
- No Unity editor binary found. Searched:\n {searched}
- {path}: expected 1 replacement for pattern, got {n}
- Could not generate a unique screenshot filename for '{fullPa
- Color array must have 3 or 4 elements.
- Port must be positive.
AI-assisted analysis of CoplayDev/unity-mcp@c21bf496bc (2026-08-13).
Data as JSON: /api/errors/5728f073422a53f5.
Report an issue: GitHub.