Ccmmutty logo
Commutty IT
3 min read

【Unity Hub】「Unable to create project」でプロジェクトが作成できない時の対処法

https://cdn.magicode.io/media/notebox/blob_2SxhX6p
「Unable to create project」エラーの原因と対策をまとめました

原因

Unity HubからインストールしたUnityがディレクトリごと消えてしまっていた

対処法

Unity Hubから再度Unityをインストールして解決

調査ログ

以下でログを確認(Mac)
tail -f ~/Library/Application\ Support/UnityHub/logs/*
ログの場所は以下参照
エラーログ
{
    "timestamp": "2023-12-24T12:42:50.095Z",
    "level": "error",
    "moduleName": "LocalProjectService",
    "message": "[\n  'Error while creating a new project',\n  {\n    errorCode: 'ERROR.LAUNCH_EDITOR.ENOENT',\n    params: { i18n: [Object] },\n    error: Error: ENOENT: no such file or directory, access '/Applications/Unity/Unity.app/Contents/MacOS/Unity'\n        at Object.accessSync (node:fs:258:3)\n        at t.accessSync (node:electron/js2c/asar_bundle:2:8282)\n        at LaunchProcess.isPathValid (/Applications/Unity Hub.app/Contents/Resources/app.asar/build/main/services/editorApp/launchprocess.js:21:16)\n        at LaunchProcess.start (/Applications/Unity Hub.app/Contents/Resources/app.asar/build/main/services/editorApp/launchprocess.js:30:47)\n        at EditorApp.<anonymous> (/Applications/Unity Hub.app/Contents/Resources/app.asar/build/main/services/editorApp/editorapp.js:103:18)\n        at Generator.next (<anonymous>)\n        at fulfilled (/Applications/Unity Hub.app/Contents/Resources/app.asar/build/main/services/editorApp/editorapp.js:4:58)\n        at process.processTicksAndRejections (node:internal/process/task_queues:96:5) {\n      errno: -2,\n      syscall: 'access',\n      code: 'ENOENT',\n      path: '/Applications/Unity/Unity.app/Contents/MacOS/Unity'\n    }\n  }\n]"
}
/Applications/Unity/Unity.app/Contents/MacOS/Unity
このディレクトリが無いと言われている。Unityが無い?
いつの間にかUnityを消してしまっていた様子。
InstallsにあるUnityを一度消して再度Install
無事プロジェクトが作成できるようになりました

Discussion

コメントにはログインが必要です。