private void Start() { textureDataSettings.ApplyToMaterial(terrainMaterial.GetMaterial()); textureDataSettings.UpdateMeshHeights(terrainMaterial.GetMaterial(), heightMapSettings.MinHeight, heightMapSettings.MaxHeight); float maxViewDst = detailLevels[detailLevels.Length - 1].visibleDstThreshold; meshWorldSize = meshSettings.MeshWorldSize; chuncksVisibleInViewDst = Mathf.RoundToInt(maxViewDst / meshWorldSize); UpdateVisibleChunks(); }