0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Unity】スクリプトのフォルダを変更したらFailed to find entry-pointsとかいうエラーが出てスクリプトが読み込めなくなった

Posted at

症状

スクリプトはフォルダ内に存在していて、Unityからも確認できるがVisual StudioなどのIDEから参照できなくなる。
プロジェクトの再ビルドや再起動でも治らない。

結論

フォルダ名を"Editor"にしていた為。フォルダ名を変更するのが速い。

エラーから辿っていろいろ探ったけど原因がシンプルだったため、備忘録的な。
エラー自体はパスが間違っている~とかアセンブリがビルドされていない~とかそんなところ。
いろいろ調べていくうちに、凡ミスに気付いた。

Unity側がエディタースクリプトを扱うためにフォルダ名"Editor"を予約している。
そのため、扱うスクリプトによってはエラーとなることも。
同様に"Resources"フォルダや"Plugins"フォルダなども稀にですが、エラーが出る。

フォルダ名に"Editor"を用いたくて、IDEからでも参照できるようにするためにはアセンブリ定義など回避方法があるっぽいが
今回、自分のケースだとこのフォルダ名である必要はない為,
詳しく調べてない。

0
0
0

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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?