From 5c989491b9dd4653aadffa29080e81940b93d41a Mon Sep 17 00:00:00 2001 From: vis2k Date: Sun, 29 Jan 2023 01:48:56 +0900 Subject: [PATCH] NetworkClient.NetworkLateUpdate: use .localTime in all Unity versions --- Assets/Mirror/Core/NetworkClient.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Assets/Mirror/Core/NetworkClient.cs b/Assets/Mirror/Core/NetworkClient.cs index 46d3b0d1b..e54da84ac 100644 --- a/Assets/Mirror/Core/NetworkClient.cs +++ b/Assets/Mirror/Core/NetworkClient.cs @@ -1471,13 +1471,10 @@ internal static void NetworkLateUpdate() // also important for syncInterval=0 components like // NetworkTransform, so they can sync on same interval as time // snapshots _but_ not every single tick. + // + // Unity 2019 doesn't have Time.timeAsDouble yet if (!Application.isPlaying || -#if !UNITY_2020_3_OR_NEWER - // Unity 2019 doesn't have Time.timeAsDouble yet AccurateInterval.Elapsed(NetworkTime.localTime, sendInterval, ref lastSendTime)) -#else - AccurateInterval.Elapsed(Time.timeAsDouble, sendInterval, ref lastSendTime)) -#endif { Broadcast(); }