Everyone who uses git (or any other vcs) with Unity probably ran across the problem that scene merging is not exactly possible. On gamejams, we just agreed on yelling locks on scene files out loud
There is a tool called UniMerge in the Asset Store, available for $15, which allows you to merge scenes. Since I think this is a really important feature to have, I decided to create my own merge tool editor extension, and make it free and open source.There are still some things to do, but it has reached a state where I think I can tell you about it, so you can try it and give feedback.
It currently only works with git. I’ll see if there’s interest in changing that.
I’d love to hear from you if you use this or even have feedback.
If you want to improve stuff, don’t hesitate to make pull requests.
Check the github issues to see what’s next on the menu.
Happy new year everyone!
I used the last few days to improve the feature set of this tool. You can now merge prefabs and arrays
Also, the UI, even though it has room for improvements, works pretty fine now on most parts imo.
I’ll continue to work on the rough edges here. Next up is a major refactoring of the main window class.
But apart from that, I think that the tool is ready to be used in your project.
As always, I’d love to hear from you about it!
Edit : I have a problem using the tool. I created 2 branches and made changes to the same scene and prefab, for testing purposes. However, merging the scene is duplicating all the objects in the hierarchy root (this happens as soon as I press “Start merging this scene” and is not cancelled by a “abort merge”). I’m in merge state within git
Edit 2 : Weird, i can click on “start merging this scene” even if I’m not in a merging state… and the same duplicating problem happens
@FlaSh-G Hi. No sadly I don’t have any errors.
I tried again today with a good example : I changed the hierarchy of my scene from (ours) :
UIRootCanvas
Camp
EventSystem
To (theirs, as it’s a rebase) :
MyScene
UIRootCanvas
Camp
EventSystem
Here is the result choosing all theirs (because I want this new hierarchy) :
As you can see there is a duplication.
Edit : Wo, it seems that it’s the same object, but displayed twice (selecting one selects the other, and expanding one expands the other).
Edit 2 : Saving, closing unity and opening the scene again makes the wrong duplicate disappear. So it’s some kind of display glitch ! Good
I’m going to try a new merge, as I may have made mistakes in this one (some of “theirs” changes have not been applied correctly). I may have been to quick during the process.
Edit 3 : Sadly is seems that a lot of my changes (theirs, in this case, as it is a rebase) are not displayed. I can’t explain why. I removed and added a components to a UIButton for example, which is somewhere inside UIRootCanvas. This change is not displayed anywhere (I assure you it exists ). This is really weird.
You are among the few people who give me feedback for this, so I’m not surprised there are some situations I never even tested for
Do you use the most current version of the tool? Within the last few weeks, a lot has been changed and added in terms of added/deleted objects and parenting. Maybe the problem’s gone already? If not, please feel free to check the project’s issue page and support the development there!
Hi,
First I want to thank you for making this available to all, awesome job!
I’m facing a problem when merging, I have done exactly what the instructions say, I got a conflict and in the merging state of Git I opened the window and clicked start merging scenes, but I always get this error:
“ArgumentException: An element with the same key already exists in the dictionary.”
Two extra scenes are being created, ‘OURS’ and ‘THEIRS’, but nothing further happens as it stops at the error on top, I hope you can help me fix this.
I guess you are using Unity 5?
The tool doesn’t work at all in Unity 5, since a really tiny detail has been changed - and that breaks everything.
Please vote here to have this changed again in a future Unity version.
Oh damn that’s not good, it seems it is going to take a long time.
Thanks for telling me, I have already voted, really hope they fix it.
Is there a way to safely merge scenes, it is really annoying to work while only one can work on the scene at a time, I have searched a lot but it seems no one can find a proper way, not even with the unity team license.
There is an Asset called UniMerge in the Asset Store that is supposed to do just that. GitMerge was inspired by that package. I’m not sure how well it works in Unity 5 though.
Other than that, if there was a nice way to do it, I wouldn’t have started this project
Ya I know about it, though I was hoping for a free solution, and I wonder the same thing, whether it is still functional.
Thanks for your help anyway, please keep us updated if unity reverts their change.