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;
     }
 }
示例#3
0
 public void Replicate(RMPPeer to = null)
 {
     RMPNetworkService.Replicate(this, to);
 }