Running two instances of Unity simultaneously to debug network code

Hello

Myself and Edd Smith (Origami Blue) found an easy way to run two instances of unity on the same project, which is useful for writing network code. Apologies if this was already posted somewhere (we didn’t find it anywhere). This worked fine for us on Unity v3.4.2.

The solution involves duplicating the project to another folder while linking the Assets so that both projects use the same scripts etc. First we recommend the following changes to the settings - switch “Show Project Wizard at Startup” on (Edit/Preferences…/General), and make the player run in the background so that both instances will run simultaneously (Build Settings…/Player Settings…/Run In Background).

Make a copy of the top level unity project folder to another location. However, instead of duplicating the assets folder, use a symbolic link:

cd <duplicated_project_folder>
mklink /D Assets <original_project_folder>\Assets

Then start a second copy of unity and direct it to the duplicated project. You can then make changes to scripts and click both editors and it will rebuild code.

Note that since a copy of the project settings has been made, changes to project settings will not be applied across (although the settings files could probably be symlink’d as well).

Huw Bowles/West Pier Studio
Edd Smith/Origami Blue

Or just use uCollab )).

Thanks a lot for this tip. It has saved me a lot of time in network debugging. I am trying to do this with webplayer as a platform, and somehow this seems to fail. It works well for standalone though.

guys,
It works with project settings as well so you can use symbolic links for them as well.
it only works well with binary/mixed serialization modes and requires the meta files if i remember correctly.
we’ve documented it in our website as well before.
http://nooparmy.com/index.php/products/educational-materials/24-opening-a-unity-project-in-multiple-editors-for-multiplayer-development.html