public static bool isAuthoritative(bool isLocalPlayer, RealOwner realOwner) { if (useUNet) { if (isLocalPlayer) { return(true); } return(false); } else { if (Network.peerType == NetworkPeerType.Disconnected) { return(true); } else if (Network.player == realOwner.owner) { return(true); } return(false); } }
public static bool isAuthoritative(NetworkIdentity identity, RealOwner realOwner) { if (identity != null) { return(isAuthoritative(identity.isLocalPlayer, realOwner)); } else { return(true); } }