From 61b6340d69b3c7ffd95f1e439293310866aa3a5b Mon Sep 17 00:00:00 2001 From: LPLafontaineB Date: Thu, 4 Aug 2022 14:46:30 -0400 Subject: [PATCH 1/2] initializing the LastSentState when spawning the NetworkTransform --- com.unity.netcode.gameobjects/Components/NetworkTransform.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Components/NetworkTransform.cs b/com.unity.netcode.gameobjects/Components/NetworkTransform.cs index 82c1ab8b2c..353c97a9c9 100644 --- a/com.unity.netcode.gameobjects/Components/NetworkTransform.cs +++ b/com.unity.netcode.gameobjects/Components/NetworkTransform.cs @@ -862,7 +862,7 @@ public override void OnNetworkSpawn() { TryCommitTransformToServer(m_Transform, m_CachedNetworkManager.LocalTime.Time); } - m_LocalAuthoritativeNetworkState = m_ReplicatedNetworkState.Value; + m_LastSentState = m_LocalAuthoritativeNetworkState = m_ReplicatedNetworkState.Value; // crucial we do this to reset the interpolators so that recycled objects when using a pool will // not have leftover interpolator state from the previous object From e9fe76937d70700a0c311defa4d2d2520918fef4 Mon Sep 17 00:00:00 2001 From: LPLafontaineB Date: Thu, 4 Aug 2022 15:04:21 -0400 Subject: [PATCH 2/2] updating changelog --- com.unity.netcode.gameobjects/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.netcode.gameobjects/CHANGELOG.md b/com.unity.netcode.gameobjects/CHANGELOG.md index a2e2ce3448..d8a7504c86 100644 --- a/com.unity.netcode.gameobjects/CHANGELOG.md +++ b/com.unity.netcode.gameobjects/CHANGELOG.md @@ -22,6 +22,7 @@ Additional documentation and release notes are available at [Multiplayer Documen - Fixed NetworkLists not populating on client. NetworkList now uses the most recent list as opposed to the list at the end of previous frame, when sending full updates to dynamically spawned NetworkObject. The difference in behaviour is required as scene management spawns those objects at a different time in the frame, relative to updates. (#2062) - Fixed NetworkList Value event on the server. PreviousValue is now set correctly when a new value is set through property setter. (#2067) - Fixed NetworkList issue that showed when inserting at the very end of a NetworkList (#2099) +- Fixed NetworkTransform LastSentState not initialized at time of spawning. (#2106) ## [1.0.0] - 2022-06-27