- Home /
The question is answered, right answer was accepted
How to copy a scene to a new unity project
I'm trying to copy a scene from one Unity project to another, all the scripts and resources required exist in both places but when I copy it in or export/import it as an asset all the references to other assets in the inspector are lost. I.e If I have a variable pointing at a texture that becomes "None"
How can I copy a scene and preserve all the references?
Same problem here. Was there ever a solution? This link seems to suggest that an option exists for including the Library (project settings) in your Export, but I can't seem to find that option in the Unity IDE: http://docs.unity3d.com/Documentation/ScriptReference/ExportPackageOptions.html
Here's what I say to that:
for i in range(1, 100):
print("I'm having the same dang problem!)
In any other software such as let's say $$anonymous$$ax/$$anonymous$$SP, you would export the complete scene from a menu command. The whole necessary assets, and only them, would automatically be selected and exported to a packaged scene, which you would then be able to open in any other project or share with others.
Thus in unity, you have to manually selet every item to include or exclude to/from the package. That is called, making things difficult !
Thank you to everyone who posted here. I needed this information, and it was crystal clear. After backing everything up, I did this, and it worked perfectly. :)
Answer by Eric5h5 · Jul 21, 2011 at 04:39 PM
The way to copy a scene is to select it and do Assets -> Export Package, then import it into the new project. Make sure all dependencies are included.
Plenty of people do it all the time and it works fine. So what's more likely: "it doesn't work" (when it does), or you're doing something wrong?
OP's attitude is really problematic. The kind of user that give support a headache. I would tell him to check the little box that say "Include dependencies", and don't copy paste code in a new script files because it screws up Unity meta references and what not, but I assume I'll receive "It doesn't work" as a response
Once and for all this does work. However as we can all read in the question description the OP said:
all the scripts and resources required exist in both places
The pure "existance" of the resources is not enough. They need to have the same meta data. If you just copy the same script to another project it will be a completely different asset and can't be referenced by the scene when you import it. You always have to either export all assets required within a package or make sure you copy the files with their meta files.
Since this question is about 8 years old, already correctly answered and constantly bumped for no reason without adding any useful information, I'll accept Eric's answer and close this question. If you feel like you have to contribute any new information on that topic, ask a seperate question and be more specific what doesn't work and what exactly happens. Which kind of objects are affected by the problem, etc... Also before posting another rant, create a simple repro case which you could share which demonstrates the issue. If you don't have the time to do this or you're not willing to ask specific question, just stop dropping your frustration here. This is not a support forum where you can reach the developers of Unity. Bumping questions without adding something new just hurts everyone else who actually has a well described problem and needs help.
Answer by asafsitner · Jul 21, 2011 at 12:51 PM
Unity stores the connections between assets in the Library folder. Since every project has its own Library folder, if you just copy the assets the connections will break. You need to export the scene and all its content as a package. Alternatively, you can try copying over the Library folder, but that can possibly cause errors and/or warnings, as well as break existing connections.