how to fix unity color terrain code example

Example: unity set terrain to image

1. Add a splat texture to your terrain with the texture you want to cover the 
whole thing.
Set the tile size to the same size as the terrain (if your terrain is 1000x1000 then that's your tile size).

2. Choose a very large brush with full opacity and paint that splat onto the 
whole terrain.

3. Make sure that the texture you use as a splat has enough resolution to 
look good (both in the original image and the size you import it to in the 
import settings).