NetworkClient.NetworkLateUpdate: use .localTime in all Unity versions

This commit is contained in:
vis2k 2023-01-29 01:48:56 +09:00
parent a0accce89a
commit 5c989491b9

View File

@ -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();
}