Skip to content

Commit 9134d7e

Browse files
Apply netcode.standards formatting fixes
1 parent d195290 commit 9134d7e

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2713,24 +2713,24 @@ internal bool ApplyNetworkParenting(bool removeParent = false, bool ignoreNotSpa
27132713
}
27142714
else // If the parent still isn't spawned add this to the orphaned children and return false
27152715
if (!parentNetworkObject.IsSpawned)
2716-
{
2717-
OrphanChildren.Add(this);
2718-
return false;
2719-
}
2720-
else
2721-
{
2722-
// If we made it this far, go ahead and set the network parenting values
2723-
// with the WorldPoisitonSays value set to false
2724-
// Note: Since in-scene placed NetworkObjects are parented in the scene
2725-
// the default "assumption" is that children are parenting local space
2726-
// relative.
2727-
SetNetworkParenting(parentNetworkObject.NetworkObjectId, false);
2716+
{
2717+
OrphanChildren.Add(this);
2718+
return false;
2719+
}
2720+
else
2721+
{
2722+
// If we made it this far, go ahead and set the network parenting values
2723+
// with the WorldPoisitonSays value set to false
2724+
// Note: Since in-scene placed NetworkObjects are parented in the scene
2725+
// the default "assumption" is that children are parenting local space
2726+
// relative.
2727+
SetNetworkParenting(parentNetworkObject.NetworkObjectId, false);
27282728

2729-
// Set the cached parent
2730-
SetCachedParent(parentNetworkObject.transform);
2729+
// Set the cached parent
2730+
SetCachedParent(parentNetworkObject.transform);
27312731

2732-
return true;
2733-
}
2732+
return true;
2733+
}
27342734
}
27352735

27362736
// If we are removing the parent or our latest parent is not set, then remove the parent.

0 commit comments

Comments
 (0)