File tree Expand file tree Collapse file tree
com.unity.netcode.gameobjects/Documentation~/basics Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ public class Door : NetworkBehaviour
204204 protected override void OnNetworkPostSpawn ()
205205 {
206206 // Everyone updates their door state when finished spawning the door.
207- UpdateFromState ();
207+ UpdateFromState (true );
208208 base .OnNetworkPostSpawn ();
209209 }
210210
@@ -235,7 +235,7 @@ public class Door : NetworkBehaviour
235235 {
236236 // Update to the current state while also providing a catch for
237237 // the first synchronization where previous == current.
238- UpdateFromState (previous != current );
238+ UpdateFromState ();
239239 }
240240
241241 /// <summary >
@@ -259,8 +259,8 @@ public class Door : NetworkBehaviour
259259 // if first sync, reset to closed and don't play sound
260260 }
261261
262- // If 1st sync, don 't log a message about a change in state
263- // since previous == current (i.e. no change in state)
262+ // Don 't log a message about a change in state when first
263+ // synchronizing.
264264 if (! isFirstSynchronization )
265265 {
266266 var openClosed = State .Value ? " open" : " closed" ;
You can’t perform that action at this time.
0 commit comments