WindowsでUnityをインストール後、起動しても画面が真っ暗という状況が発生することがあります(Windows10 64bit/ Unity 5.4.2f1で確認)。これは、どうやら必要なファイルが正常に展開されないことが原因のようで、手動で整えてやることで解決できます。
C:\Users\(ユーザー名)\AppData\Roaming\Unity\Packagesのフォルダを見ると、package.jsonだけがありモジュールがインストールされていないことがわかります。
このpackage.jsonの中身をのぞくと以下のようになっています。
{
"name": "unity-editor",
"version": "5.3.0",
"description": "Unity is a powerful cross-platform 3D engine and a user friendly development environment. Easy enough for the beginner and powerful enough for the expert; Unity should interest anybody who wants to easily create 3D games and applications for mobile, desktop, the web, and consoles.",
"author": "Unity Technologies",
"dependencies": {
"unity-editor-home": "0.1.35",
"unityeditor-cloud-hub" : "0.0.13",
"unityeditor-collab-history": "0.0.27",
"unityeditor-collab-toolbar": "0.0.46"
}
}
dependenciesの4つのモジュールは、以下の場所にダウンロードされています。
C:\Program Files\Unity\Editor\Data\Resources\Packages
よって、以下の作業を行うことでブラックスクリーン現象を解決できます。
-
C:\Users\(ユーザー名)\AppData\Roaming\Unity\Packagesにnode_modulesというフォルダを作る -
node_modulesの中に、unity-editor-homeというフォルダを作る -
C:\Program Files\Unity\Editor\Data\Resources\Packagesの中にあるunity-editor-home.0.1.35.tgzを展開し、中のpackage.jsonとdistフォルダを取り出す - 3で取り出した
package.jsonとdistを2で作成したunity-editor-homeに配置する - 他のモジュール(
unityeditor-cloud-hub、unityeditor-collab-history、unityeditor-collab-toolbar)についても同様に行う
これでOKです(冷静に考えると、nodeが入っていればnpm installだけでいいかも)。UnityにWelcomeしてもらえると思います。
