LoginSignup
0

More than 5 years have passed since last update.

【Rider】Unityで新規プロジェクト作成と設定の保存ができない場合の対処

Last updated at Posted at 2019-01-24

はじめに

久しぶりにUnity触ろうと新規プロジェクト作成しようとしたができなかった。
解決にちょっと悩んだので備忘録。

症状

具体的にはFile -> New Project -> Create projectとしてもプロジェクトが作成されず、Unityが死んだまま再起動もされない。

また、Unity -> Preferencesから設定を変更してUnityを再起動しても設定が保存されていない。

環境

  • Unity 2018.2.3f1, 2018.2.20f1
  • Rider 2018.2.3

2つのバージョンのUnityで試したけど両方ダメだった。

エラー内容

$ tail -f ~/Library/Logs/Unity/Editor.log

...
Refresh: detecting if any assets need to be imported or removed ...
Refresh: elapses 0.017180 seconds (Nothing changed)
Refresh completed in 0.017242 seconds.
Refresh: detecting if any assets need to be imported or removed ...
Refresh: elapses 0.016770 seconds (Nothing changed)
Refresh completed in 0.016825 seconds.
[Package Manager] Server::Kill -- Server was shutdown
Cleanup mono
get_unityVersion is not allowed to be called while application is terminating.
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Scripting/ScriptingThreadAndSerializationSafeCheck.cpp Line: 85)
Unhandled Exception: UnityEngine.UnityException: get_unityVersion is not allowed to be called while application is terminating.
at <0x00000>
at <0x00000>
at <0x00000>
at <0x00000>
at <0x00000>
at <0x00000>
at <0x00000>


Unhandled Exception: UnityEngine.UnityException: get_unityVersion is not allowed to be called while application is terminating.

この部分を読む限りだと終了時に異常が起きていて正しく終了できていないように見える。

なので設定を変更して終了しても変更が保存される前に死ぬのでは。

エラーの原因

エラーでググった。

"GET_UNITYVERSION IS NOT ALLOWED TO BE CALLED WHILE APPLICATION IS TERMINATING." IN LOG FILE WITH CERTAIN CMD ARGUMENTS

IVANSHAKHOVJAN 04, 2019 12:37
I can reproduce it with Rider EditorPlugin.

Riderのプラグインが原因らしい。

解決方法(WIP)

  1. Assets -> Plugins -> Editor -> JetBrainsをディレクトリごと削除
  2. Unityを終了(まだエラー出て死ぬ)
  3. Unityを起動
  4. Unityを終了(エラーが出ずに正しく終了)

でとりあえず解決。

でもRider使えないと困るので、Riderを開いて再度プラグインをインストール。
インストール完了後、以下のポップアップが出た。

Rider plugin v2018.2.0.104 can be found at: Assets\Plugins\Editor\JetBrains\JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll.

これでUnityを終了すると再度同じエラーが出たので、根本的な解決にはならなかった。

Riderのバージョンとか上げたらいいんだろうか。また後で試す。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0