Skip to content

List of APIs

IanPies edited this page May 16, 2020 · 5 revisions

ClonesManager.IsClone()

Will return true if this is a cloned 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()) {
          // Automatically connect to local host
        }
        else // If this is the original project 
        { 
          // Start server
        }
    }
}
#endif

ClonesManager.GetArgument()

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

Clone this wiki locally