Quantcast
Channel: Answers by "JMurray"
Viewing all articles
Browse latest Browse all 4

Answer by JMurray

$
0
0
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.

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>