Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by Zeroth · Aug 18, 2010 at 05:52 PM · terrainduplicate

Duplicate Terrain?

We have one outside scene, and we want to make a couple of indoor scenes. We want all the terrain of the outside, the trees, etc, visible through the windows. For this we need the terrains in each scene to be separated to scene-specific changes can be made. All the trees have been placed, so placing more trees is not a concern.

Every method I've tried in duplicating terrain has failed. Duplicating the terrain in the hierarchy does not work as the terrains are still connected. Duplicating the terrain assets (TerrainData) also does not work either. I have also tried making a new terrain and replacing its terrain data with a duplicated terrain data, but everything remains invisible. What is the correct way to duplicate a terrain so that changes to one do not affect the others?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image markfrancombe · Mar 15, 2016 at 10:31 PM 0
Share

None of these solutions are working for me!!! Im on Unity 5.2.1 free... In the above from @$$anonymous$$artian Games when i do the step 3. "notice it says "Terrain Asset $$anonymous$$issing," It doesn't... its stays exactly the same---

Surely there must be a way to copy/paste a terrain so you can work on a new one without affecting the old? $$anonymous$$

avatar image Martian-Games markfrancombe · Mar 15, 2016 at 11:21 PM 0
Share

hi! I deleted my answer now because that worked for a much older version of Unity. Have you tried $$anonymous$$elvin's solution for Unity 5+ ?

4 Replies

· Add your reply
  • Sort: 
avatar image
9
Best Answer

Answer by Eric5h5 · Aug 18, 2010 at 10:05 PM

Duplicating the terrain assets (TerrainData) also does not work either.

Duplicating the terrain asset definitely does work.

Edit: I should note that you should drag the duplicated terrain asset into the scene in order to create the terrain duplicate. If you duplicate the terrain that's already in the scene and try setting the terrain data asset via the inspector, it seems to be bugged and won't establish the link correctly.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
11

Answer by Bunny83 · Mar 16, 2016 at 05:13 AM

Since there are still people having trouble with the Terrain script, here are a few facts:

  • The TerrainData asset that is created when you create a new terrain in the scene contains all information that will make up the terrain.

  • The Terrain script that is attached to a GameObject just has a "hidden" link to that TerrainData asset.

  • This link isn't ment to be changed once a terrain has been created. However it's possible to change it, more details at the end.

  • When you duplicate the TerrainData asset you definitely have a seperate asset. The new asset as no connection to the old one.

  • Do not duplicate the old gameobject that contains the Terrain script. The hidden link inside the Terrain script will still point to the old asset. So both Terrain instances would use the same TerrainData asset.

  • To actually create a new Terrain object in the scene you have to drag the new TerrainData asset into the scene / hierarchy view. This will create a new GameObject with a new Terrain script that has that new TerrainData asset linked internally. It also creates a TerrainCollider with the new asset linked.

Finally here's how you can change the linked TerrainData asset after the Terrain object has been created:

So just imagine you have duplicated the TerrainData asset as well as the Terrain GameObject in the scene. As said before that new gameobject will still use the original TerrainData asset. The TerrainCollider component on the same gameobject actually has an object field where you can select / set the TerrainData asset that it should use. Unfortunately the custom editor for the Terrain script is lacking such an object field.

However you can change it anyways by switching the Inspector window into debug mode. Just open the window menu of the Inspector by clicking on the button at the at the top right of the inspector. Select "Debug" to switch into debug mode.

When the inspector is in debug mode, no custom editor or propertydrawer will be used, not even the built-in that comes with Unity. The inspector now simply shows all data that has been serialized for the inspected objects. The Terrain script has a field called "Terrain Data". There you can drag&drop your new TerrainData asset. Once you have linked the asset you should switch the Inspector back into "Normal" mode.

Don't forget to also change the TerrainCollider so it also uses the new asset.

Once you've done this you can edit both terrains independently from each other.

As far as i know this has been the case from the very beginning. Nothing has changed since then. I use Unity since version 2.6 and back in 2009 / 2010 it was already that way.

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image markfrancombe · Mar 16, 2016 at 05:17 PM 0
Share

Thanks @Bunny83 This is the only answer that ACTUALLY WOR$$anonymous$$S!!!! And believe me I have read $$anonymous$$ANY, about swapping Splat $$anonymous$$aps, or duplicating game objects... ITS THE DEBUG $$anonymous$$ODE THATS THE THING!!! As the Terrain Data is actually exposed here, I can duplicate the Terrain I want to base my new terrain on, add it to the new Terrain and start tweaking, leaving the original terrain intact.

This was perfect thanks... You got some points from me...!

$$anonymous$$ark

avatar image Bunny83 markfrancombe · Mar 16, 2016 at 05:31 PM 0
Share

Well, no. Erics answer does say the exact same thing. The usual way is to drag the TerrainData asset into the scene which will create an actual GameObject in the scene. What i said at the bottom was just a way to change an existing terrain to use a different TerrainData object. It's by far easier to just duplicate the TerrainData asset and drag it into the scene, just like Eric said back in 2010. ^^

avatar image markfrancombe · Mar 17, 2016 at 05:36 AM 0
Share

@bunny83 Argh! NOW I see what @Eric5h5 means... There is some confusion with his ter$$anonymous$$ology, as I wold call the $$anonymous$$AIN Terrain thing that is created by the Create/Terrain menu, the asset- The thing HE means is the Terrain Data Asset...

But I have to say, Im surprised I didn't just try that method... And your way. with DEBUG, was informative and taught me something new too...

avatar image browne11 · Jun 14, 2017 at 09:02 PM 0
Share

This is the correct way using newer versions of unity and seems to be the only way with the newer ones, I was sure it worked another way before as I did it, but now all that seems to work is the terrain data route. This should be up voted more!

It's way easier to work with now then ever so that is good news!

avatar image meowzakatz · Jun 11, 2021 at 07:41 PM 0
Share

It's 2021 and this is still what worked for me.

avatar image
4

Answer by huynhke · Jul 25, 2014 at 05:29 PM

Hey guys,

I also found another solution (the last two answers weren't working for me). Instead of duplicating my terrain asset in Unity, these are the steps I took.

  • Close Unity

  • Go to the folder that holds your Terrain.asset

  • Duplicate that file (so the .meta file isn't created)

  • Paste that file where you want it to be

  • Open Unity (now it'll create a .meta file that is specific to the new terrain)

  • Drag your .asset into your scene and VOILA!

This worked for me as a workaround. There's still some where connection going on (blue paintbrush highlight still shows on both terrain, but doesn't paint on both terrain. Materials on both terrain paintbrush tab is also connected) but it works.

-Kelvin

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Pawl · Feb 04, 2015 at 06:40 AM 0
Share

+1, this bug still exists as of Unity 4.6 and duplicating the file manually worked.

avatar image
3

Answer by Julian-Glenn · Aug 18, 2010 at 07:43 PM

Does Eric's answer not work?

http://forum.unity3d.com/viewtopic.php?t=60392&view=next&sid=0f4b2b5d55e40e49c6cfc92a420b954c

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Make a simple tree 1 Answer

Duplicated terrain gets affected by old terrain? [Unity 5] 1 Answer

Duplicating Terrain at run-time 2 Answers

terrain work 2 Answers

Making Duplicate Terrain Unique? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges