diff --git a/com.unity.netcode.gameobjects/Runtime/Core/NetworkBehaviour.cs b/com.unity.netcode.gameobjects/Runtime/Core/NetworkBehaviour.cs index aa1e25338b..4fee32c989 100644 --- a/com.unity.netcode.gameobjects/Runtime/Core/NetworkBehaviour.cs +++ b/com.unity.netcode.gameobjects/Runtime/Core/NetworkBehaviour.cs @@ -269,6 +269,12 @@ internal void __endSendClientRpc(NetworkSerializer serializer, uint rpcMethodId, /// public bool IsOwnedByServer => NetworkObject.IsOwnedByServer; + /// + /// Used to determine if it is safe to access NetworkObject and NetworkManager from within a NetworkBehaviour component + /// Primarily useful when checking NetworkObject/NetworkManager properties within FixedUpate + /// + public bool IsSpawned => HasNetworkObject ? NetworkObject.IsSpawned : false; + /// /// Gets the NetworkObject that owns this NetworkBehaviour instance ///