Tips for Network development with the Unity Editor

When working on networked games with Unity, one of the biggest challenge is iteration time.

With multiplayer development, every change that you make requires you to either:

1) have a second full copy of your Unity project locally, opened in a second Instance of Unity, OR

2) make a build / exe to test your changes.

There is a Unity UPM Package called 'ParrelSync' that provides a massive workflow improvement when working on multiplayer games with unity.

Original Repo:

The link below is the original repo for the package, including installation instructions etc.

Megacrush Fork

We also maintain our own fork of the primary repo with some very small changes:

  • the original repo adds a top-level 'parrel sync' menu to the editor. We moved all of the menu items under a 'Tools' menu, which matches the majority of the other 3rd party Asset Store plugins (including the Runtime Spawner itself).

ParrelSync is a Unity editor extension that allows users to test multiplayer gameplay without building the project by having another Unity editor window opened and mirror the changes from the original project.

Features

  1. Test multiplayer gameplay without building the project

  2. GUI tools for managing all project clones

  3. Protected assets from being modified by other clone instances

  4. Handy APIs to speed up testing workflows

Usage

Navigate to Tools → Parrel Sync → Clones Manager

By default you will not have any clones.

Creating a Project Clone

Click ‘Create new Clone’ to setup the first copy of the project.

Note: this is basically the same as opening up the Unity project from the beginning, and will take some time.

Once this completes, you will see the new ‘Clone’ in the list.

In practice, what Parrel Sync does is clone the project Library folder and creates a ‘Read Only’ clone Unity project that you can use to open & run the project without needing to make a build.

How does it work?

For each clone instance, ParrelSync will make a copy of the original project folder and reference the Asset, Packages and ProjectSettings folder back to the original project with symbolic link. Other folders such as Library, Temp, and obj will remain independent for each clone project.

All clones are placed right next to the original project with suffix _clone_x, which will be something like this in the folder hierarchy.

/ProjectName
/ProjectName_clone_0
/ProjectName_clone_1
...

Opening a Clone

Once you have created a Clone, you can use the window above to ‘Open in New Editor’, which will open the project in a separate instance of the Unity Editor.

You can create any number of clones (but be aware that each does make a copy of the Library folder, and takes up the appropriate disk space.

Working with Parrel Sync

The TLDR workflow with Parrel Sync is that you still work in the ‘Master’ Unity project. The clones are ONLY used to open and play the game. No changes should be made in the Clones, and ParrelSync with actively attempt to block any changes in your 'cloned' copy.

Troubleshooting & FAQ

https://github.com/VeriorPies/ParrelSync/wiki/Troubleshooting-&-FAQs

Last updated