Sponsored By

Featured Blog | This community-written post highlights the best of what the game industry has to offer. Read more like it on the Game Developer Blogs.

Opening a Unity project in multiple editors (for goodness of multiplayer game development)

In this post I'll show you how to open the same unity project in multiple unity editors to have a much better workflow in development of multi player games. No additional tools are required and it will help a lot.

Ashkan Saeedi Mazdeh, Blogger

July 16, 2013

3 Min Read

This post is previously posted in our company's educational materials section here.

At first i should say that if it proves interesting for Gamasutra readers, i'll post more workflow related and multiplayer related stuff here.

When you are making a multiplayer game, you need to test both client and server, When you are doing it using technologies like UnityPark suite and unity's built in networking which give you the power of using unity on the server as well, it's a good idea to have both server and client in the same project. A lot of code is shared between them and as long as you manage to separate their code and data when building it will be the easiest way of doing it. You can have anything on the server from meshes to sounds if it helps debugging and remove them later on. You can at first share much code and separate them over time and lots and lots of more stories.

To do this you need to be able to open the same project in multiple unity editors to be able to test it easily and powerfully using all editor capabilities and avoiding build times which can become really high in big projects. MuchDifferent's uCollab was a solution for this to put one project as master and one as slave but recently uCollab's development was put on pending to focus resources on other stuff and rewrite uCollab or something like this (the original announcement is available in their mailing lists). During the development of Badanamu we searched for another way of opening a project in multiple editors. I've read something in UnityPark suite's LinkedIn group about symbolic links and wanted to try them, when asked Petter hansson of MuchDifferent he already had them working so we found a way to share a project between multiple editors.

Using symbolic links you can link Assets and ProjectSettings of your project in another folder and then open the second folder using unity editor and let it build the library folder. In this way you can even link to network addresses and have as much copies of a project running in editor as your system memory allows. To do this you should simply open windows command prompt with administrator privilage (right click and run as administrator) and type a command like this

mklink /d Assets sourceProject/Assets
mklink /d ProjectSettings SourceProject/ProjectSettings

It's assumed that you are in the directory that you want to have your project clone in. just type mklink /? and you should not have any problems. That's it! Now if you change anything in any of the projects then it will change in all of them and you don't have the problem of changing stuff in slave project and remembering that it's the wrong place to do work. The symbolic link basically makes the folders the same. the target linked Assets folder is the original one. Amin Mousavi in our Army here built an editor script to do it easily as well which we'll release soon in one way or another (asset store/github...)

For this to work you don't need unity pro but meta files should be enabled which should be the case most of the times cause you are using version control for your projects. If you've never heard of meta files then go to Edit>ProjectSettings>Editor and enable them in the right pain which the settings appear. Also it only works with binary serialization so if your team is using text based serialization and is used to merge changes of a scene/prefab by svn then it will make your work a little harder. If multiple people don't work on the same scene/prefab at the same time then you should not have any problems with using binary serialization, it will be both smaller and faster.

Read more about:

Featured Blogs
Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like