In-editor version control for Unity (Free/Open Source)

Edit: Now available on GitHub and Bitbucket! (It’s stil under heavy development):

https://github.com/Thinksquirrel-Software/Unity-Version-Control
https://bitbucket.org/Thinksquirrel/unity-version-control

License is GPL (No runtime code at all, so it’s fine to use with your commercial games).

Hey guys,

Just wanted to make this thread as an outline/progress log for a side project that I’m working on - In-editor version control for Unity. It’s currently using git, I’d like to add other version control systems where appropriate. I’ll update this post as I work on the project.

I’ve decided to do this because I would like a nice way to work with version control within Unity, on different platforms. I am not a fan of the Asset Server at all (it’s way too limiting in functionality, in my opinion), but I would really like a nice way to do things like switch branches without interrupting my Unity workflow. Also, I know that Unity is working on more version control integration, but I have no idea what systems they plan on supporting, and would like an open source solution to the problem as well.

Current features (Git only right now):

  • Initialize a repository if none is present. DONE
  • File browser (working tree and index) DONE
  • Ignore (modifies .gitignore) - automatically configures .gitignore to ignore the Library and Temp folders
  • Add DONE
  • Remove DONE
  • Reset DONE
  • Commit (with option to amend) DONE
  • Fetch DONE
  • Branch DONE
  • Merge
  • Pull (with option to rebase) DONE
  • Push (with option to push tags) DONE
  • Configure remotes (these can be a local path, ssh, https, etc.)
  • Subversion remotes
  • Open config file
  • Log viewer
  • Switch local branches/tags (automatically restarts unity to switch) Branches done

Let me know if you guys have any feature requests. This is a free, open source project. Also, this project needs a name - any suggestions?

How about TickGit or TigGit (tick it / ticket)?

This would be really cool if a damn version control will finally work with Unity…

Here’s the first screenshot (It’s so bland and icky! But it’s a start…)

Sounds interesting. Good luck.

Another update. The diff isn’t very pretty yet, but it’s working!

This sounds really nice.

I’m going to be the difficult one and request Mercurial support.

Then you’ll be happy to hear that I literally just finished making an abstraction layer with support for both git and mercurial. I haven’t implemented Mercurial yet (Once the repository is online anyone is welcome to do this), but I’ve abstracted away everything and included some stub files, so it’ll only be a day or two of work to do so.

Add, remove, and commit functionality are all implemented. Yay!

Add, remove, and commit functionality are all implemented. Yay!

Also, I’ve uploaded the repository to Github/Bitbucket.

I’m so happy to see this. Thank you for making this!

Does it work with Unity Basic? It doesn’t say anywhere and I take it that you have the pro version since you’ve tried Asset Server.

Yes, it works with Unity Basic (version 3.5+), since Unity now enables meta files for all versions.

I’ll test this out on my personal projects but I won’t be able to use it at work. This is primarily because A) git falls down hard on versioning large and binary files and B) the GUI tools seemed to expose more of git’s complexity than a standard command line workflow would do. This didn’t bode well for our artists, who don’t need a lot of the features DVCS provides.

Like I said though - I’ll still use it for my personal projects because it’s worked well for me in that kibd of limited environment.

Sorry to be a downer. We’re evaluating PlasticSCM in the mean time which is free for 15 seats or something like that. So far it has a pot of promise.

Hey,

Thanks for taking the time to check the project out!

I wouldn’t recommend it for use at work just yet, honestly. And no worries - It’s still under very heavy development so things can definitely change. I have some features in mind to make workflow easier, like the option to commit files without a staging area, but the first step is to make sure everything is working properly.

That said, if you have any other suggestions for making things easier for an artist point of view I’d love to hear them!

Hey this work is really cool, congrats! and thanks for sharing it.

Im curious, the abstraction layer, are you considering extending it to support SVN?

This is awesome, I’m a huge mercurial fan as well, glad that the abstraction went in. If no one steps up to work that functionality, hopefully can find some time in the future to work on it :stuck_out_tongue:

Definitely a great project, will keep my eye on it!

I’ll definitely be adding support for SVN remotes via Git - however it shouldn’t be hard at all to extend the abstraction layer to work with SVN. So that’s within the radar.

Thanks!

I just finished some tweaks to the browser, including a new “mini” mode. This hides some of the advanced functionality, and is intended for artists. I’ve also implemented switching between local branches. It also auto-restarts the Unity project - an awesome time saver!

Here’s a screenshot of the default mode:

And the new mini mode:

Also, I’ve added resize functionality to the different subpanels, added a filter for different file states, and fixed various bugs all around.

Currently working on persistance (EditorPrefs) for these new settings, then I’ll be working on the Branch editor and various windows for the remaining options.

Someone explain to me how I missed this earlier?

Love the concept, will try it out later, hope it works :slight_smile:

Sounds good, but the UI should be stripped down to be much simpler IMO. I don’t know whats possible with the Unity3D custom UI though…
Would be great to have it integrated into the Assets tree-view. With markers for changed/new files. But I guess it’s not possible to extend the default windows?

On integrating Git: I used it for a lot on non-Unity projects, but only played around when using Unity. I’m curious, can “Temp” and “Library” be completely ignored? I searched for that Info a while back, and it seemed there were several different answers and now we have the meta text files - what’s the latest status on that?

Unfortunately, I can’t easily extend an editor window like that. I will be putting images and such into the browser to make it easier to read though. I’ll look into it - I can add a context menu to assets in the project view - don’t know about icons.

Temp and Library can be completely ignored now. There’s a new ProjectSettings folder. The tool will prompt you/set this up automatically if you choose.