I am having trouble getting the TerrainToolkit.TextureTerrain to work… It give the error message that the heightStops array is out of range. Or at least I think its the height stops.
What am I doing wrong?
public Texture2D[] desertTextures;
//
void Start () {
//Set textures....
float[] sStops = new float[2];
float[] hStops = new float[4];
Texture2D[]tTexs = new Texture2D[1];
sStops[0] = 30f;
sStops[1] = 70f;
hStops[1] = Random.Range(0.05f,0.18f);
hStops[2] = Random.Range(0.19f,0.28f);
hStops[3] = Random.Range(0.5f,0.48f);
hStops[4] = Random.Range(0.7f,0.80f);
this.GetComponent<TerrainToolkit>().TextureTerrain(sStops, hStops, desertTextures);
}
}