BeardedManStudios.Network.SimpleNetworkedMonoBehavior.ServerChangeOwner C# (CSharp) 메소드

ServerChangeOwner() 개인적인 메소드

private ServerChangeOwner ( ulong newOwnerPlayerId ) : void
newOwnerPlayerId ulong
리턴 void
		private void ServerChangeOwner(ulong newOwnerPlayerId)
		{
			if (!OwningNetWorker.IsServer || !allowOwnershipChange)
				return;

			NetworkingPlayer player = null;
			player = OwningNetWorker.Players.Find(x => x.NetworkId == newOwnerPlayerId);

			if (player != null || newOwnerPlayerId == 0)
				RPC("AssignNewOwner", newOwnerPlayerId);
			else
				Debug.LogError("No such player with id " + newOwnerPlayerId + " currently connected.");
		}