void OnDestroy()
 {
     if (_instance == this)
     {
         _instance     = null;
         IsInitialized = false;
     }
 }
 void Awake()
 {
     if (_instance == null)
     {
         _instance     = this;
         IsInitialized = true;
     }
     else
     {
         Debug.LogWarning("RMP Network Service instance already exists.");
         Destroy(this);
         return;
     }
 }
Beispiel #3
0
 public void Replicate(RMPPeer to = null)
 {
     RMPNetworkService.Replicate(this, to);
 }