Skip to content

Commit 517cf45

Browse files
style
Updating comment for spelling and readability. Removing white space.
1 parent 16430ed commit 517cf45

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

com.unity.netcode.gameobjects/Runtime/Core/NetworkObject.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,8 +1721,8 @@ private void OnDestroy()
17211721
return;
17221722
}
17231723

1724-
// An authoritzed destroy is when it is happening on the authority instance or it is being destroyed due to
1725-
// a scene event that will automatically destroy any NetworkObject instances that should be destroyed with the scene.
1724+
// An authorized destroy is when done by the authority instance or done due to a a scene event and the NetworkObject
1725+
// was marked as destroy pending scene event (which means the destroy with scene property was set).
17261726
var isAuthorityDestroy = HasAuthority || NetworkManager.DAHost || DestroyPendingSceneEvent;
17271727

17281728
if (NetworkManager.IsListening && !isAuthorityDestroy && IsSpawned &&

com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ private void SendSceneEventData(uint sceneEventId, ulong[] targetClientIds)
10931093
{
10941094
EventData = sceneEvent,
10951095
};
1096-
var sendTarget = distributedAuthority && !NetworkManager.DAHost ? NetworkManager.ServerClientId : clientId;
1096+
var sendTarget = distributedAuthority && !NetworkManager.DAHost ? NetworkManager.ServerClientId : clientId;
10971097
var size = NetworkManager.ConnectionManager.SendMessage(ref message, k_DeliveryType, sendTarget);
10981098
NetworkManager.NetworkMetrics.TrackSceneEventSent(clientId, (uint)sceneEvent.SceneEventType, SceneNameFromHash(sceneEvent.SceneHash), size);
10991099
}

0 commit comments

Comments
 (0)