- Home /
Creating terrain from script
I know that this question has been solved before, but I cannot locate the actual answer. I have created some TerrainData in script and saved it as an asset. This all works really well. I am now trying to create Terrain from this TerrainData. I know that there is the method CreateTerrainGameObject(TerrainData) but every time I try to use it, Unity gives me the error 'Insert semicolon at end'. Here is the particular line:
GameObject g = Terrain.CreateTerrainGameObject(terrainData));
If I comment this line out, my script throws no errors. Any help would be greatly appreciated!
Answer by Eric5h5 · Mar 28, 2012 at 06:12 PM
You have too many parentheses at the end.
Thanks Eric5h5. I fixed that and then realized that my script is js, not c#, so once I got my variables declared correctly, it works like a charm.
Your answer
Follow this Question
Related Questions
Blend texture seam between 2 terrains tiles 1 Answer
Make a simple tree 1 Answer
Dynamic create Terrain and change the material by Script 1 Answer
Editing Resources files at runtime? 1 Answer
Destroyable terrain? 2 Answers