Esempio n. 1
0
 public void OnPeerConnected(int uid)
 {
     if (IsInstanceValid((Node)owner) && owner.IsNetworkMaster())
     {
         ReplicationServer.Instance.ReplicateID(owner, uid);
     }
 }
Esempio n. 2
0
        public static void ReplicableReady(this IReplicable n, bool replicate = true)
        {
            n.rMember.owner = n;

            if (!n.IsNetworkMaster())
            {
                NOKManager.Instance.Subscribe(n);
            }
            else if (n.rMember.ReplicateOnReady)
            {
                n.rMember.GenName();
                if (replicate)
                {
                    n.Replicate();
                }
            }
        }