Unityで「The compiler this script was imported with is not available anymore.」エラーが発生したときの対応

ヨメレバCSS
オリジナルCSS

 メッセージが出た以上のことは特になさそうだったけれど、メモしておきます。

スポンサーリンク
GoogleAdSence レクタングル(大)

「The compiler this script was imported with is not available anymore.」がコンソールに出てくる

 作業していると、いつからかプログラムを自動でビルドする度に「The compiler this script was imported with is not available anymore.」とコンソールに表示されるようになりました。

 メッセージだけ見ると、コンパイラが使えない…とあるのですが、特に(バージョンアップや変更など)何かした覚えはない。

 いちおうエラーメッセージなので気にしないわけにはいかないんですが、それ以上は目立った害もなくてなんだこれと思ってました。

 Unityフォーラムに立ったスレを見ていると、

Apparently its caused when i have a script that the class in it doesn't have the same name as the script. for example having a script named "test" if there's no class with the same name in my script it will cause this error. so try to rename your class to be the same as the script name

との書き込みがあり、クラス名とファイル名が違っているのでは、みたいな。そういえばクラス名を手動で変更しており、その作業中はクラス名とファイル名が一時的にズレている状態だったのを思い出しました。それが原因だろうか。

The compiler this script was imported with is not available anymore.

Libraryを消してみたら治った

 それでとりあえずLibraryを消す。といういつものやつ。これでエラーメッセージは出なくなりました。

 中途半端な状態でビルドされたものが残っていたことが原因だと思われるので、一端全削除してしまえばたぶん大丈夫かなと。

 それ以降はうちの環境では、いまのところ発生していません。

スポンサーリンク
GoogleAdSence レクタングル(大)

シェアする

スポンサーリンク
GoogleAdSence レクタングル(大)