コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Unity】MonoBehaviourのサブクラスをnewで生成している場合の警告

You are trying to create a MonoBehaviour using the 'new' keyword.  This is not allowed.  MonoBehaviours can only be added using

MonoBehaviourを継承したサブクラスをnewで生成している場合
上記のような警告が出力されてしまいます