- Home /
Changes to one map affect another. Help?!
During the development of my game, I decided to make use of the application.loadlevel
command by making a portal to another level somewhere within the map. I created the level I wanted the portal to lead to by entering the Assets folder and copying and pasting the original level. The copy was what I wanted the application.loadlevel
command to load and it was located in the same folder (Assets) as the original. I didn't want the next level to be an exact copy of the first so I flattened the terrain, got rid of any trees, bushes, and grass, and deleted most of the gameobjects. That's all I did. The next step was to create the portal in the original level, so I saved my changes to the new level and loaded the original, only to find that the terrain was flattened and all the trees, bushes, and grass were completely gone! The gameobjects were still in their proper positions (including the ones I deleted or moved within the copy). I couldn't undo these changes on either level (obviously because I had saved my changes to the copy). I tried right-clicking on the original level and restoring it to a previous version from three days ago, but all it did was move and resize the gameobjects, not the terrain. I have read elsewhere that changes to assets are saved automatically. I am frustrated because this game was created by four other people and I and I took it home to finish. I don't want to have to say I screwed the map over. Could someone please tell me why this happened and if there's any way to undo it? Thanks in advance.
Can't help you with this, but a quick tip. Before trying any "fixes", make a backup in case it can be fixed ;)
When you copy/paste the level, you probably included the terrain itself, which, if you look at it, has in the Terrain Collider area a field for Terrain Data with the name of the TerrainData object. After the copy/paste, both terrains (orig/new) probably still point to same TerrainData obj, so changes in one affected both.
Answer by Anonymoose54 · Mar 16, 2014 at 09:05 PM
getyour411, you're the best!
It was true that both terrains pointed to the same terrain data object. I right-clicked the terrain data object in the explorer and restored the terrain to a version from three days ago. Thanks a million!
Your answer
Follow this Question
Related Questions
How can I make the level restart when someone presses R 3 Answers
How to load levels with colliders? 1 Answer
NullReferenceException help 0 Answers
Ivisible objects when i import them? 1 Answer