For the sake of the community I'm including that I also dropped the initiate on terrain and ended up going the route of creating a new object.
//create terrain out of thin air
var newTerrainObject : GameObject = new GameObject();
newTerrainObject.transform.parent = transform;
var newTerrain : Terrain = new newTerrainObject.gameObject.AddComponent("Terrain");
//move new terrain to location
newTerrainObject.transform.position= newloc;
//layer tag object
newTerrainObject.layer = terrainLayerMask;
//create new terrainData to resolve problem with terrain data being copied to prefab
newTerrain.terrainData = new TerrainData();
//set terraindata to minimum requirements. heightmapResolution must be set before size.
newTerrain.terrainData.heightmapResolution = terrainHeightMapResolution;
newTerrain.terrainData.size = new Vector3(terrainXsize, terrainYsize, terrainZsize);
This ended up resolving a bunch of issues in the end.
↧