private void Start() { terrainObject = new GameObject("Terrain") { isStatic = true }; config = GetComponent <TerrainConfig>(); var blocksGenerator = GetComponent <TerrainBlocksGenerator>(); chunksPool = GetComponent <TerrainChunksPool>(); chunkGenerator = new TerrainChunkGenerator(blocksGenerator, chunksPool, config); modifier = GetComponent <TerrainModifier>(); modifier.Setup(chunkGenerator, terrainObject.transform); UpdateTerrain() .ContinueWith(_ => Debug.Log("First load finished!")); }
public void Setup(TerrainChunkGenerator chunkGenerator, Transform chunksParent) { this.chunkGenerator = chunkGenerator; this.chunksParent = chunksParent; }