Sorry if this question is so silly, but I really have looked hard for an answer and can't find one.
I am trying to make a particle system that has the same x width and z lenght of my terrain, and so what I thought to do was through code get those dimensions and then through code change my particle systems range in the x and z direction to match the terrain's dimensions.
So I set my landscape as a variable in the following way
function Start ()
{
var go = GameObject.Find("landscape");
}
but can't find out how to access the dimensions. Is there a way? Also is my approach even a logical one, or is there an easier way. Thank you so much
var terrainSize : Vector3;
function Start ()
{
var go = GameObject.Find("landscape");
var terrain : Terrain = go.GetComponent(Terrain);
terrainSize = terrain.terrainData.size;
}