From 8bc6f17bce896b66a35888b9d4f7443649176812 Mon Sep 17 00:00:00 2001 From: Sherif Nafee Date: Wed, 27 Nov 2024 10:21:40 +0300 Subject: [PATCH] Add missing host warning to publishers --- Runtime/Tx/ProBridgeTx.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Runtime/Tx/ProBridgeTx.cs b/Runtime/Tx/ProBridgeTx.cs index 3f1c56d..5eee6f7 100644 --- a/Runtime/Tx/ProBridgeTx.cs +++ b/Runtime/Tx/ProBridgeTx.cs @@ -33,6 +33,8 @@ namespace ProBridge.Tx private bool initialized; + private bool sentHostMissingMsg; + private void Start() { if (Bridge == null) @@ -69,6 +71,15 @@ private void OnDestroy() protected void SendMsg() { + if (!host) + { + if(!sentHostMissingMsg) Debug.LogWarning($"No host assigned for topic {topic}."); + sentHostMissingMsg = true; + return; + } + + sentHostMissingMsg = false; + var st = ProBridgeServer.SimTime.Ticks; if (_lastSimTime >= st) {