My story lats over some time and I want to show the changes of teh seasons… Therefore I need to duplicate a terrain, make some changes and then make a new copy from that one, and make further changes… The new terrains will be loaded consecutively one every “game day”.
However, if I first duplicate the terrain, THEN I noticed the terrain asset component, so I duplicated THAT.
BUT… when I make a change on Terrain 2, which is a copy of Terrain1 … THE SAME CHANGE HAPPENS ON TERRAIN1
Why is this? and how can I acive what I need…?
(I have ONE way, but its a pain. I made a BLANK new terrain, exported RAW DATA from the Terrain 1 and imported it into Terrain 2… but this ONLY transfers the height map, not locations of plants trees or textures…)
The best way to do this is to make a prefab of your Terrain 1, then instantiate it when necessary, using the instantiate command.
Let’s say you name your terrain “Terrain1”. In a script, declare a variable “terrain”, then instantiate it using Unity’s Instantiate function.
public GameObject terrain
//changeSeason is a placeholder. It's just to show when you want to change seasons
if (changeSeason) {
Instantiate (terrain, new Vector3(0.0f, 0.0f, 0.0f), Quaternion.identity);
}
Quaternion.identity is for default rotation (0, 0, 0), and new Vector3() is to create new coordinates for where it starts in global space.
Changes made to copies of terrain will effect all copies created from the same terrain data, to have unique terrain assets you will need to create a whole new terrain (you can copy height maps for the same shape and allow it to be changeable if using separate terrain data)
How I would approach this is I would:
Sculpt terrain the way I want it. (Assuming the terrain doesn’t change)
Decorate the terrain appropriately.
Copy/save the splat map (I have never done this)
Create a new gameobject and make all decorations children of it.
Select the gameobject and save it a prefab for that season, each game day have the script Instantiate the prefab (at the same position you had the gameobject when you made your decorations children of it so everything lines up with the terrain) then change the terrains splat map to whatever season you want. (the splat texture is data for the painted textures on the terrain)
Hey, hope I’m not necroposting here, but I occasionally refer back to these threads when I want to copy a terrain. In case someone has the issue I was having, the copying and dragging of the terraindata works, but you have to drag the new terrain data not over the existing terrain, like you can do with a cube, sphere, etc. You have to drag it into the scene into an empty space area. This took me a while to figure out, so just thought I’d share.
if still Many of us getting the problem just when we duplicate a terrain just by copy paste (like other objects in hierarchy) then the problem exist, The easy way to duplicate a terrain and modify it to other is as follows
In unity menubar click Window>Terrain> Terrain Toolbox , the toolbox opens in your side panel with four tabs now,
select the terrain that you wanna Duplicate in the hierarchy window, select the “Terrain Utilities” Tab in the terrain toolbox and under “Terrain Edit” you can duplicate the terrain.
Now you will see a new terrain named (1)(Clone), you can do any modifications even layers without affect the org terrain.