Skip to content

Commit 6770fde

Browse files
fix
Fixing some logic that would only skip over children if it was logging a message.
1 parent e73ddb4 commit 6770fde

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

com.unity.netcode.gameobjects/Runtime/Spawning/NetworkSpawnManager.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,9 +1967,12 @@ internal void DistributeNetworkObjects(ulong clientId)
19671967
{
19681968
continue;
19691969
}
1970-
if ((!child.IsOwnershipDistributable || !child.IsOwnershipTransferable) && NetworkManager.LogLevel == LogLevel.Developer)
1970+
if (!child.IsOwnershipDistributable || !child.IsOwnershipTransferable)
19711971
{
1972-
NetworkLog.LogWarning($"Sibling {child.name} of root parent {ownerList.Value[i].name} is neither transferrable or distributable! Object distribution skipped and could lead to a potentially un-owned or owner-mismatched {nameof(NetworkObject)}!");
1972+
if (NetworkManager.LogLevel == LogLevel.Developer)
1973+
{
1974+
NetworkLog.LogWarning($"Sibling {child.name} of root parent {ownerList.Value[i].name} is neither transferrable or distributable! Object distribution skipped and could lead to a potentially un-owned or owner-mismatched {nameof(NetworkObject)}!");
1975+
}
19731976
continue;
19741977
}
19751978
// Transfer ownership of all distributable =or= transferrable children with the same owner to the same client to preserve the sibling ownership tree.

0 commit comments

Comments
 (0)