I’m working on trying to create randomized terrains during runtime. I’ve used terrain toolkit before on unity 3, however, I was just messing around with the actual editor portion and did not delve into scripting. Now, I would like to call different terrain toolkit procedures onto my terrain but, when using the code off of their site (sixtimesnothing.com) i get that the PerlinGenerator function is not part of the UnityEngine.GameObject class. I believe i’m just missing something completely obvious. All I’m looking for is something like this:
function OnGUI ()
{
if (GUI.Button(new Rect(0,0,100,100), "Generate!"))
{
var go : GameObject = GameObject.Find("Terrain");
go.GetComponent("TerrainToolkit").PerlinGenerator( 4, 1.0, 8, 0.8 ); // This is straight off of their website...
}
}