hasAuthority comment updated

This commit is contained in:
vis2k 2022-03-22 22:38:58 +08:00
parent 012d7a5d1e
commit 2c138c5d71
2 changed files with 2 additions and 7 deletions

View File

@ -45,8 +45,7 @@ public abstract class NetworkBehaviour : MonoBehaviour
/// <summary>True if this object is on the client-only, not host.</summary> /// <summary>True if this object is on the client-only, not host.</summary>
public bool isClientOnly => netIdentity.isClientOnly; public bool isClientOnly => netIdentity.isClientOnly;
/// <summary>This returns true if this object is the authoritative version of the object in the distributed network application.</summary> /// <summary>True on client if that component has been assigned to the client. E.g. player, pets, henchmen.</summary>
// keeping this ridiculous summary as a reminder of a time long gone...
public bool hasAuthority => netIdentity.hasAuthority; public bool hasAuthority => netIdentity.hasAuthority;
/// <summary>The unique network Id of this object (unique at runtime).</summary> /// <summary>The unique network Id of this object (unique at runtime).</summary>

View File

@ -88,11 +88,7 @@ public sealed class NetworkIdentity : MonoBehaviour
/// <summary>True if this object exists on a client that is not also acting as a server.</summary> /// <summary>True if this object exists on a client that is not also acting as a server.</summary>
public bool isClientOnly => isClient && !isServer; public bool isClientOnly => isClient && !isServer;
/// <summary>True if this object is the authoritative player object on the client.</summary> /// <summary>True on client if that component has been assigned to the client. E.g. player, pets, henchmen.</summary>
// Determined at runtime. For most objects, authority is held by the server.
// For objects that had their authority set by AssignClientAuthority on
// the server, this will be true on the client that owns the object. NOT
// on other clients.
public bool hasAuthority { get; internal set; } public bool hasAuthority { get; internal set; }
/// <summary>The set of network connections (players) that can see this object.</summary> /// <summary>The set of network connections (players) that can see this object.</summary>