# Local testing via ParrelSync

[ParrelSync](https://github.com/VeriorPies/ParrelSync) is an open-source project which allows you to open multiple Unity Editor instances, all pointing to the same Unity project (using Symbolic links).

**Pros**

* Short iteration times
* Easy to debug since every client is an Editor
* Works with Unity versions prior to Unity 6

**Cons**

* Can be more resource demanding than just running builds
* Each clone requires the whole project to be duplicated on disk (1 clone means 2x the disk space, and so on). This might be a lot for huge projects.

## How to use?

* Install [ParrelSync](https://github.com/VeriorPies/ParrelSync) as described in their [Installation Instructions](https://github.com/VeriorPies/ParrelSync#installation)
  * UPM Package installation is preferred as coherence supports it out-of-the-box
  * If installed via .unitypackage, you need to set [`CloneMode.Enabled`](https://unityapi.coherence.io/docs/v2.0.0/api/Coherence.Editor.CloneMode.html#Coherence_Editor_CloneMode_Enabled) by yourself. One way is by adding the following script to an *Editor* folder in your project:

```csharp
// Assets/Editor/CoherenceClone.cs
// This script is only needed if you're installing ParrelSync via .unitypackage

using Coherence.Editor;

[InitializeOnLoad]
internal class CoherenceClone
{
  static CoherenceClone()
  {
    CloneMode.Enabled = ParrelSync.ClonesManager.IsClone();
  }
}
```

* Open *ParrelSync* > *Clones Manager*. Create a new clone, and open it
* Continue development in the main Editor. Don't edit files in clone Editors
* Make sure [baked data](https://docs.coherence.io/2.0/manual/baking-and-code-generation) is up-to-date before starting to test, and that the Replication Server is running with the latest [schema](https://docs.coherence.io/2.0/manual/advanced-topics/schema-explained) generated
* Enter **Play Mode** in each Editor

coherence tells apart ParrelSync clones from the main Editor, so it's easier for you to not edit assets in clones by mistake.

<figure><img src="https://lh7-eu.googleusercontent.com/oPye1yDqQhrUTYgnrXZsFoNJ7GN69qLnaVDz17ZI5J30OZFE8PGoS__VW0bANCkhL610jJPNYmXRU5mRU0GpR33DjvTx5q0ljury62UCK56Dq76XVytEhgvEWoMSHTc2vO3R2rP2JhIugvRDP0JJFo_q1A=s2048" alt=""><figcaption><p>Inspecting a CoherenceSync on a clone</p></figcaption></figure>

<figure><img src="https://lh7-eu.googleusercontent.com/iB77lZ975kiQ3XlF3eJNCHkwaHj0nL67IRUC8LKQlMFQTufnFoHeaFmnxFeVShcSBFYbb5f4MJheQHuRqZArq5ZXT2YN1WUIfzLXlms3ErA5jM2VwKN1ONWJ7qXWFBq5cZ3cHevcdxd-5GMqvxig47zV1g=s2048" alt=""><figcaption><p>Main Editor and a clone Editor side by side</p></figcaption></figure>
