File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ public abstract class NetworkBehaviour : MonoBehaviour
62
62
/// <summary>True if this object is on the client and has been spawned by the server.</summary>
63
63
public bool isClient => netIdentity . isClient ;
64
64
65
+ /// <summary>Returns true for spawned objects in host mode.</summary>
66
+ public bool isHost => isServer && isClient ;
67
+
65
68
/// <summary>True if this object is the the client's own local player.</summary>
66
69
public bool isLocalPlayer => netIdentity . isLocalPlayer ;
67
70
Original file line number Diff line number Diff line change @@ -88,6 +88,9 @@ public sealed class NetworkIdentity : MonoBehaviour
88
88
// => fixes https://github.com/vis2k/Mirror/issues/2533
89
89
public bool isServer { get ; internal set ; }
90
90
91
+ /// <summary>Returns true for spawned objects in host mode.</summary>
92
+ public bool isHost => isServer && isClient ;
93
+
91
94
/// <summary>Return true if this object represents the player on the local machine.</summary>
92
95
//
93
96
// IMPORTANT:
You can’t perform that action at this time.
0 commit comments