Ejemplo n.º 1
0
    private void Start()
    {
        terrainData.ApplyToMaterial(terrainMaterial);
        viewerPositionLastUpdate = Vector3.negativeInfinity;

        WaterRenderer waterRenderer = gameObject.AddComponent <WaterRenderer>();

        waterRenderer.waterMaterial = waterMaterial;
        waterRenderer.CreateCameras(waterData.resolution, waterData.waterLevelY);

        InvokeRepeating("UpdateTerrainChunks", 0, 0.1f);
    }
 void OnValuesUpdates()
 {
     data.ApplyToMaterial(data.terrainMaterial);
     data.UpdateMeshHeights(data.terrainMaterial, 0.0f, maxHeight);
 }