1
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?

More than 3 years have passed since last update.

[unity]The script don't inherit a native class that can manage a script. のエラー解決例

Last updated at Posted at 2021-05-25

どんなもの?

よく見かける記事によると、(scriptをAdd Componentしようとした時に出る)ファイル名とclass名が一致してないというエラー

...らしいのですが実際は自分の遭遇時はエラーの内容が違った模様だったので記事にしました。

結論

該当のファイル以外のコンパイルエラーがあり、先にそちらを解消してからAdd Componentしたらエラーを出さずにscriptをアタッチできました。

原因

おそらくAdd Componentのタイミングもコンパイラーが動いていて、エラーを吐いたら一律でThe script don't inherit a native class that can manage a script.と出すようにしているのからだと思われます。

参考

公式の質問板:
https://forum.unity.com/threads/the-script-dont-inherit-a-native-class-that-can-manage-a-script.1011988/page-2

1
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
1
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?