You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Assets/Mirror/Core/NetworkBehaviour.cs
+18-6Lines changed: 18 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -72,8 +72,10 @@ public abstract class NetworkBehaviour : MonoBehaviour
72
72
publicboolhasAuthority=>isOwned;
73
73
74
74
/// <summary>authority is true if we are allowed to modify this component's state. On server, it's true if SyncDirection is ServerToClient. On client, it's true if SyncDirection is ClientToServer and(!) if this object is owned by the client.</summary>
75
-
// on the client: if owned and if clientAuthority sync direction
76
-
// on the server: if serverAuthority sync direction
75
+
// on the client: if Client->Server SyncDirection and owned
76
+
// on the server: if Server->Client SyncDirection
77
+
// on the host: if Server->Client SyncDirection (= server owns it), or if Client->Server and owned (=host client owns it)
78
+
// in host mode: always true because either server or client always has authority, and host is both.
77
79
//
78
80
// for example, NetworkTransform:
79
81
// client may modify position if ClientAuthority mode and owned
@@ -84,10 +86,20 @@ public abstract class NetworkBehaviour : MonoBehaviour
84
86
//
85
87
// also note that this is a per-NetworkBehaviour flag.
86
88
// another component may not be client authoritative, etc.
0 commit comments