GitMerge for Unity - Merge your scene files for free

Hi there.

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 :slight_smile:

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.

The tool looks pretty much like this:

You can get more information (including insctructions) here: GitMerge for Unity
The project itself is here: GitHub - FlaShG/GitMerge-for-Unity: Unity plugin for merging sceneand prefabs files when using git.

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.

Greetings :slight_smile:

1 Like

Haven’t tried it so far, but want to say THANK YOU for your work and sharing it with the community! Really nice of you!

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 :smile:

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!

awsome!

Awesome, we are going to test this right away !

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

Thanks for that tool !

@RDeluxe : Do you get any error messages? This sounds like an exception being thrown while the merge is being initialized.

The tool does open the other version of the scene additively, but should make the objects added completely invisible before you could even notice.

Thank you so much for sharing this tool. I will give it a try later on, it sounds incredibly useful.

@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 :smile:
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 :smile: ). 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 :slight_smile:

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,

I downloaded the latest version from Github before trying today. So I guess it’s the last one (Master).

I took a look at the issue page and did not find anything related, but I’ll look again and post 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.

Hi there,

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 :slight_smile:

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.
:slight_smile:

I sure hope to be able to do so soon :wink:

1 Like