void OnEnable() { if (!GridMetrics.noiseSource) { GridMetrics.noiseSource = noiseSource; GridMetrics.InitializeHashGrid(seed); GridMetrics.colors = colors; } }
void Awake() { GridMetrics.noiseSource = noiseSource; GridMetrics.InitializeHashGrid(seed); GridMetrics.colors = colors; cellCountX = chunkCountX * GridMetrics.chunkSizeX; cellCountZ = chunkCountZ * GridMetrics.chunkSizeZ; CreateChunks(); CreateCells(); }
private void Awake() { gridMaterials = GameObject.Find("EditorCanvas").GetComponent <MapEditor>().materials; cellCountX = chunkCountX * GridMetrics.chunkSizeX; cellCountZ = chunkCountZ * GridMetrics.chunkSizeZ; GridMetrics.InitializeHashGrid(seed); chunkCuller = new CullingGroup(); chunkCuller.SetBoundingDistances(new float[] { distanceBand1, distanceBand2, distanceBand3 }); chunkCuller.onStateChanged = StateChangedMethod; CreateChunks(); CreateCells(); }
void OnEnable() { GridMetrics.InitializeHashGrid(seed); }