https://answers.unity.com/questions/862032/c-constructor-in-monobehaviour.html
See, serialization of the objects in the scene (and the scripts on them) happens a lot; whenever you save, whenever you press play, a lot of times. Instantiation of new objects, and thus calls to the constructor, probably happens as a part of that process. So if you say create a new gameobject as a part of your constructor, you'd be seeing that gameobject being added to your scene at different points when you didn't expect the constructor to be called.
在monobehaviour的class内使用construction function是不安全的。不推荐使用。
标签:function,scene,unity,SerializationCallbackReceiver,constructor,monobehaviour,you From: https://www.cnblogs.com/sun-shadow/p/17080282.html