How to instantiate object class that contains GameObject?
问题 I am attempting to instantiate a large number of "particles" using a C# script in Unity. I have created a particle class that contains the creation of a corresponding GameObject. The GameObject within each particle instance is a sphere. When attempting to instantiate a new particle (Particle p = new Particle(...)) I get a Unity warning that the 'new' keyword should not be used. "You are trying to create a MonoBehaviour using the 'new' keyword. This is not allowed. MonoBehaviours can only be