public void NewArea( EnvTypeInfo envTypeInfo, List <SpawnsInfo> spawnsInfos, LevelSettings levelSettings, LevelView outputLevel, Action <LevelAreaView> onDone = null) { // DebugUtils.Log( // "LevelAreaGeneratorView.NewArea(); envType={0}", envType); area = outputLevel.NewArea(envTypeInfo); if (spawnsInfos.Count == 0) { if (onDone != null) { onDone(area); } return; } Profiler.BeginSample("LevelAreaGeneratorView.NewArea()"); this.envTypeInfo = envTypeInfo; this.spawnsInfos = spawnsInfos; this.levelSettings = levelSettings; this.onDone = onDone; level = outputLevel; spawnsInfosIndex = 0; NextObjectType(); reservedSpawnPoints.Clear(); InvokeRepeating("NewObject", objectSpawnRate, objectSpawnRate); Profiler.EndSample(); }