こんにちは
unityのactiveSelfが使えなくなってしまいました.
前提条件
- Unity 2019.3.3f1

これで保存すると,
error CS1061: ‘<class名>’ does not contain a definition for ‘activeSelf’ and no accessible extension method ‘activeSelf’ accepting a first argument of type ‘<class名>’ could be found (are you missing a using directive or an assembly reference?)
と,言われてしまった.
CS1061:存在しないメソッド、クラス、メンバーにアクセスしようとしたときに生じる。
http://yamakami21.hatenablog.com/entry/2015/04/20/204151
解決策
どうやらthisの理解が間違っていたようです
- this → class
- this.gameObject → そのclassがアタッチされているゲームオブジェクト
まだまだ理解が甘いようです.
結果的に

これで動きました.
めでたし,めでたし
コメント