Skip to content

Commit 938b923

Browse files
committed
dotnet-fix
1 parent 3486ca9 commit 938b923

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ internal void ProcessDirtyObjectServer(NetworkObject dirtyObj, bool forceSend)
5656
if (m_NetworkManager.DistributedAuthorityMode || dirtyObj.IsNetworkVisibleTo(client.ClientId))
5757
{
5858
// Sync just the variables for just the objects this client sees
59-
foreach(var behaviour in dirtyObj.ChildNetworkBehaviours.Values)
59+
foreach (var behaviour in dirtyObj.ChildNetworkBehaviours.Values)
6060
{
6161
behaviour.NetworkVariableUpdate(client.ClientId, forceSend);
6262
}
@@ -73,7 +73,7 @@ internal void ProcessDirtyObjectServer(NetworkObject dirtyObj, bool forceSend)
7373
[MethodImpl(MethodImplOptions.AggressiveInlining)]
7474
internal void ProcessDirtyObjectClient(NetworkObject dirtyObj, bool forceSend)
7575
{
76-
foreach(var behaviour in dirtyObj.ChildNetworkBehaviours.Values)
76+
foreach (var behaviour in dirtyObj.ChildNetworkBehaviours.Values)
7777
{
7878
behaviour.NetworkVariableUpdate(NetworkManager.ServerClientId, forceSend);
7979
}
@@ -86,7 +86,7 @@ internal void ProcessDirtyObjectClient(NetworkObject dirtyObj, bool forceSend)
8686
[MethodImpl(MethodImplOptions.AggressiveInlining)]
8787
internal void PostProcessDirtyObject(NetworkObject dirtyObj)
8888
{
89-
foreach(var behaviour in dirtyObj.ChildNetworkBehaviours.Values)
89+
foreach (var behaviour in dirtyObj.ChildNetworkBehaviours.Values)
9090
{
9191
for (int i = 0; i < behaviour.NetworkVariableFields.Count; i++)
9292
{

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ public void DeferDespawn(int tickOffset, bool destroy = true)
454454
}
455455
else // Clients just send their deltas to the service or DAHost
456456
{
457-
foreach(var behaviour in ChildNetworkBehaviours.Values)
457+
foreach (var behaviour in ChildNetworkBehaviours.Values)
458458
{
459459
behaviour.NetworkVariableUpdate(NetworkManager.ServerClientId);
460460
}
@@ -2701,7 +2701,7 @@ internal bool InitializeChildNetworkBehaviours()
27012701
#endif
27022702

27032703
var networkBehaviours = GetComponentsInChildren<NetworkBehaviour>(true);
2704-
foreach(var behaviour in networkBehaviours)
2704+
foreach (var behaviour in networkBehaviours)
27052705
{
27062706
// Find the first parent NetworkObject of this child
27072707
// if it's not ourselves, this childBehaviour belongs to a different NetworkObject.

com.unity.netcode.gameobjects/Runtime/Messaging/Messages/NetworkTransformMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public bool Deserialize(FastBufferReader reader, ref NetworkContext context, int
9292

9393
if (isSpawnedLocally)
9494
{
95-
if (!networkObject.ChildNetworkBehaviours.TryGetValue((ushort) networkBehaviourId, out var behaviour) || behaviour == null)
95+
if (!networkObject.ChildNetworkBehaviours.TryGetValue((ushort)networkBehaviourId, out var behaviour) || behaviour == null)
9696
{
9797
Debug.LogError($"[{nameof(NetworkTransformMessage)}][Invalid] Targeted {nameof(NetworkTransform)}, {nameof(NetworkBehaviour.NetworkBehaviourId)} ({networkBehaviourId}), does not exist! Make sure you are not spawning {nameof(NetworkObject)}s with disabled {nameof(GameObject)}s that have {nameof(NetworkBehaviour)} components on them.");
9898
return false;

0 commit comments

Comments
 (0)