- Home /
How to merge 2 projects into one
I am having problem with combining 2 projects together. I have 2 games, I want to put them in one project so they become one game that has both games.
My problem is that I used some the assets of the first game in the second game and then I made the necessary changes in these assets on the second game.
I had no idea that this would backfire on me! When I try to put the files of the second project in the first one some prefabs and scenes of the 2nd project are linked with scripts from the first project! Although they are different in content and name!
I tried a different approach by exporting the 2nd project files, but when I open the package I find that Unity will override the assets in the 1st project.
I tried another approach by deleting all meta files in the 2nd project and copy the assets to the first project... still the same problem!
What's really confusing me is that both projects have different meta files
Help!
How many assets are common between the two project? Can you rename the assets?
Answer by Abhiroop-Tandon · Apr 01, 2016 at 08:16 AM
It is a very difficult task and it will take time, you will need to be patient. What you can do is bring assets one by one, export some import some and do this gradually. If the game logic is same in both the games and only minor changes are there, what you can do is export the things removing dependencies so that at least the GameObjects of the second game are there and you will only need to connect them by your script or however it works. Just look whats common in both the projects and dont import/export that, remove dependencies and connect them afterwards. Hope this helps !!
Thanks, I did another solution though... it was painful and boring to do.
I copied the files in the first project and after they were imported I opened the 2nd project and reassigned the scripts.
hi did you manage to play both games on 1 screen? like a split screen but 2 different games running?
Jason, this was not my intention... however what you're asking is possible. All you have to do is run a scene, then add the second scene, if you're doing this by script then use Scene$$anonymous$$anager.LoadScene("scene name", LoadScene$$anonymous$$ode.Additive), note that you have to put both scenes in different locations so they don't overlap each other. They can't be both at (0,0,0). Now you have 2 cameras in the scene, you have to set the viewport Rect on both cameras so each of them cover half of the screen.
Your answer
Follow this Question
Related Questions
How can i merge mesh vertices using a script? 2 Answers
Merging 2 Textures Into 1 1 Answer
solve merge conflict in unity collab 1 Answer