From 84353559f985fc507d9fe067e6a155b2dbb4ec2e Mon Sep 17 00:00:00 2001 From: bnco <33021110+bnco-dev@users.noreply.github.com> Date: Tue, 20 Aug 2024 12:53:14 +0100 Subject: [PATCH] Make connection warning persistent during reconnect attempts --- Unity/Assets/Ubiq/Runtime/Rooms/RoomClient.cs | 5 ++--- Unity/Assets/Ubiq/Samples/Demo (XRI)/Demo.unity | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Unity/Assets/Ubiq/Runtime/Rooms/RoomClient.cs b/Unity/Assets/Ubiq/Runtime/Rooms/RoomClient.cs index 0c16f70a..fe628d54 100644 --- a/Unity/Assets/Ubiq/Runtime/Rooms/RoomClient.cs +++ b/Unity/Assets/Ubiq/Runtime/Rooms/RoomClient.cs @@ -245,7 +245,7 @@ public IEnumerable Peers public static readonly float HeartbeatInterval = 1f; public static readonly float HeartbeatWarningThreshold = 5f; public static readonly float HeartbeatTimeoutThreshold = 10.0f; - + public TimeoutBehaviour timeoutBehaviour = TimeoutBehaviour.ReconnectAndRejoin; private PeerInterfaceFriend me = new PeerInterfaceFriend(Guid.NewGuid().ToString()); @@ -705,9 +705,8 @@ public void Reconnect(bool rejoin) OnPeerRemoved.Invoke(peer); } - // Reset ping + // Reset ping so we have a small window before we try again pingReceived = Time.realtimeSinceStartup; - PlayerNotifications.Delete(ref notification); // Reconnect all connections foreach (var server in servers) diff --git a/Unity/Assets/Ubiq/Samples/Demo (XRI)/Demo.unity b/Unity/Assets/Ubiq/Samples/Demo (XRI)/Demo.unity index 6c6f5228..6c6d81fd 100644 --- a/Unity/Assets/Ubiq/Samples/Demo (XRI)/Demo.unity +++ b/Unity/Assets/Ubiq/Samples/Demo (XRI)/Demo.unity @@ -132,7 +132,7 @@ GameObject: m_Component: - component: {fileID: 261526883} m_Layer: 0 - m_Name: Ubiq Interactables + m_Name: Ubiq Interactables (XRI) m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1488,6 +1488,6 @@ SceneRoots: - {fileID: 1995168927} - {fileID: 8839457145026391851} - {fileID: 1925563522} - - {fileID: 742749608137116523} - {fileID: 261526883} + - {fileID: 742749608137116523} - {fileID: 2065098753}