public void spawnNewEnv() { GameObject envObject = new GameObject(); EnvVar newenv = envObject.AddComponent <EnvVar>(); newenv.init(this); this.envVariables.Add(newenv); }
public void createInitialEnv() { for (int i = 0; i < this.maxEnv; i++) { GameObject envObject = new GameObject(); EnvVar newenv = envObject.AddComponent <EnvVar>(); newenv.init(this); this.envVariables.Add(newenv); } }