//@script ExecuteInEditMode()

var left : Terrain;
var top : Terrain;
var right : Terrain;
var bottom : Terrain;

var dinamic : boolean = false;

private var terr : Terrain;


function Start () {
	terr = GetComponent(Terrain);
	SetNeoNeighbors();
}

function FixedUpdate()
{
	if (dinamic) SetNeoNeighbors();
}

@ContextMenu ("SetNeoNeighbors")
function SetNeoNeighbors()
{
	terr.SetNeighbors (left, top, right, bottom);
}

RequireComponent (Terrain);