From 2c138c5d71810487bdcf332e3c403ca3a7620018 Mon Sep 17 00:00:00 2001 From: vis2k Date: Tue, 22 Mar 2022 22:38:58 +0800 Subject: [PATCH] hasAuthority comment updated --- Assets/Mirror/Runtime/NetworkBehaviour.cs | 3 +-- Assets/Mirror/Runtime/NetworkIdentity.cs | 6 +----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Assets/Mirror/Runtime/NetworkBehaviour.cs b/Assets/Mirror/Runtime/NetworkBehaviour.cs index 25d390637..7d3b652ce 100644 --- a/Assets/Mirror/Runtime/NetworkBehaviour.cs +++ b/Assets/Mirror/Runtime/NetworkBehaviour.cs @@ -45,8 +45,7 @@ public abstract class NetworkBehaviour : MonoBehaviour /// True if this object is on the client-only, not host. public bool isClientOnly => netIdentity.isClientOnly; - /// This returns true if this object is the authoritative version of the object in the distributed network application. - // keeping this ridiculous summary as a reminder of a time long gone... + /// True on client if that component has been assigned to the client. E.g. player, pets, henchmen. public bool hasAuthority => netIdentity.hasAuthority; /// The unique network Id of this object (unique at runtime). diff --git a/Assets/Mirror/Runtime/NetworkIdentity.cs b/Assets/Mirror/Runtime/NetworkIdentity.cs index 9865d7985..a14e6ff29 100644 --- a/Assets/Mirror/Runtime/NetworkIdentity.cs +++ b/Assets/Mirror/Runtime/NetworkIdentity.cs @@ -88,11 +88,7 @@ public sealed class NetworkIdentity : MonoBehaviour /// True if this object exists on a client that is not also acting as a server. public bool isClientOnly => isClient && !isServer; - /// True if this object is the authoritative player object on the client. - // 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. + /// True on client if that component has been assigned to the client. E.g. player, pets, henchmen. public bool hasAuthority { get; internal set; } /// The set of network connections (players) that can see this object.