2021-05-27 Unity MonoBehavior
Unity MonoBehavior一个类继承了MonoBehaviour就不能通过 new 的方式生成对象,可以通过挂在GameObject身上通过Find()获得警告信息:You are trying to create a MonoBehaviour using the 'new' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent().一个类没有继承MonoBe...
原创
2021-05-27 16:30:16 ·
412 阅读 ·
0 评论