{"record":{"id":"fffec743b932a104","repo":"CoplayDev/unity-mcp","slug":"assets-folder-not-found-assets-dir","errorCode":null,"errorMessage":"Assets folder not found: {assets_dir}","messagePattern":"Assets folder not found: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"tools/prepare_unity_asset_store_release.py","lineNumber":115,"sourceCode":"        help=\"Only validate that operations would succeed; do not write/copy/delete.\",\n    )\n    args = parser.parse_args()\n\n    repo_root = Path(args.repo_root).expanduser().resolve()\n    asset_project = Path(args.asset_project).expanduser().resolve(\n    ) if args.asset_project else (repo_root / \"TestProjects\" / \"AssetStoreUploads\")\n    remote_url = args.remote_url.strip()\n    if not remote_url:\n        raise RuntimeError(\"--remote-url must be a non-empty URL\")\n\n    source_mcp = repo_root / \"MCPForUnity\"\n    if not source_mcp.is_dir():\n        raise RuntimeError(\n            f\"Source MCPForUnity folder not found: {source_mcp}\")\n\n    assets_dir = asset_project / \"Assets\"\n    if not assets_dir.is_dir():\n        raise RuntimeError(f\"Assets folder not found: {assets_dir}\")\n\n    dest_mcp = assets_dir / \"MCPForUnity\"\n\n    if args.dry_run:\n        print(\"[dry-run] Validated paths. No changes applied.\")\n        print(\"[dry-run] Would stage a temporary copy of MCPForUnity and apply Asset Store edits there.\")\n        print(\n            f\"[dry-run] Would replace:\\n- {dest_mcp}\\n  with\\n- {source_mcp}\")\n        return 0\n\n    # 1) Stage a temporary copy of MCPForUnity and apply Asset Store-specific edits there.\n    with tempfile.TemporaryDirectory(prefix=\"mcpforunity_assetstore_\") as tmpdir:\n        staged_mcp = Path(tmpdir) / \"MCPForUnity\"\n        shutil.copytree(source_mcp, staged_mcp)\n\n        setup_service = staged_mcp / \"Editor\" / \"Setup\" / \"SetupWindowService.cs\"\n        menu_file = staged_mcp / \"Editor\" / \"MenuItems\" / \"MCPForUnityMenu.cs\"\n        http_util = staged_mcp / \"Editor\" / \"Helpers\" / \"HttpEndpointUtility.cs\"","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/CoplayDev/unity-mcp/blob/c21bf496bca87d54e75bad048563c3adb1782081/tools/prepare_unity_asset_store_release.py#L97-L133","documentation":"Raised when asset_project / 'Assets' is not a directory. The Asset Store upload must target a valid Unity project, and every Unity project has an Assets/ folder at its root. Its absence means the --asset-project path is not a Unity project (or doesn't exist).","triggerScenarios":"Passing --asset-project to a folder that is not a Unity project (no Assets/ subfolder); the project hasn't been created yet; the path is misspelled or points at a parent directory. When --asset-project is omitted, the default repo_root/TestProjects/AssetStoreUploads is used — if that test project hasn't been scaffolded, this fires.","commonSituations":"The AssetStoreUploads test project was never created locally; pointing at the repo root instead of the project folder; the Unity project lives at a different path on this machine.","solutions":["Confirm the Unity project exists and contains an Assets folder: ls <asset_project>/Assets.","Pass --asset-project with the correct absolute path to your Unity project.","If using the default, create or clone the TestProjects/AssetStoreUploads project first."],"exampleFix":"# before\npython tools/prepare_unity_asset_store_release.py --asset-project /path/to/some/folder --remote-url https://...\n\n# after\npython tools/prepare_unity_asset_store_release.py --asset-project /path/to/MyUnityProject --remote-url https://...","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\nasset_project = Path(my_project_path).resolve()\nif not (asset_project / \"Assets\").is_dir():\n    raise SystemExit(f\"{asset_project} is not a Unity project (no Assets/ folder).\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Confirm the target project has an Assets/ folder before running the script.","If using the default TestProjects/AssetStoreUploads, ensure it is scaffolded first."],"tags":["build-script","release-tooling","path-validation","unity-project","filesystem"],"backgroundTag":null,"analyzedSha":"c21bf496bca87d54e75bad048563c3adb1782081","analyzedAt":"2026-08-13T17:36:56.095Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}