Skip to content

List of APIs

314pies edited this page Sep 3, 2020 · 5 revisions

ClonesManager.IsClone()

Will return true if this is a clone project, else false.
Here's an example usage:

// This should be editor only
#if UNITY_EDITOR
using UnityEngine;
using ParrelSync;

public class MyMultiplayerTestScript: MonoBehaviour
{
    void Start()
    {
        if (ClonesManager.IsClone()) 
        {
          // This is a clone project, connect to local host
        }
        else  
        { 
          // This is the original project, start server
        }
    }
}
#endif

ClonesManager.GetArgument()

Will return the custom argument of the cloned project.
Check out the Argument page for more details.