Skip to content

Commit 983bd1b

Browse files
update
Invoking the OnAuthorityPushTransformState and OnNetworkTransformStateUpdated when synchronizing in order to provide users with the NetworkTransformState used to synchronize a NetworkTransform when first spawned.
1 parent 952a40b commit 983bd1b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,10 +1762,12 @@ protected override void OnSynchronize<T>(ref BufferSerializer<T> serializer)
17621762
// for the non-authority side to be able to properly synchronize delta position updates.
17631763
CheckForStateChange(ref SynchronizeState, ref transformToCommit, true, targetClientId);
17641764
SynchronizeState.NetworkSerialize(serializer);
1765+
OnAuthorityPushTransformState(ref SynchronizeState);
17651766
}
17661767
else
17671768
{
17681769
SynchronizeState.NetworkSerialize(serializer);
1770+
OnNetworkTransformStateUpdated(ref SynchronizeState, ref SynchronizeState);
17691771
}
17701772
}
17711773

0 commit comments

Comments
 (0)