From 73bfabd94eea522581fc7b1399ed19cfb8e989a8 Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Mon, 10 Feb 2025 15:08:32 -0600 Subject: [PATCH 01/13] update Adding rules for parenting and how child hierarchies are distributed when a client disconnects or connects. --- .../networkobject-parenting.md | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/advanced-topics/networkobject-parenting.md b/docs/advanced-topics/networkobject-parenting.md index 66bae036d..8052b978e 100644 --- a/docs/advanced-topics/networkobject-parenting.md +++ b/docs/advanced-topics/networkobject-parenting.md @@ -8,7 +8,7 @@ description: A NetworkObject parenting solution within Netcode for GameObjects ( If you aren't completely familiar with transform parenting in Unity, then it's highly recommended to [review over the existing Unity documentation](https://docs.unity3d.com/Manual/class-Transform.html) before reading further to properly synchronize all connected clients with any change in a GameObject component's transform parented status, Netcode for GameObjects requires that the parent and child GameObject components have NetworkObject components attached to them. -### Parenting rules +### Parenting rules - Setting the parent of a child's `Transform` directly (that is, `transform.parent = childTransform;`) always uses the default `WorldPositionStays` value of `true`. - It's recommended to always use the `NetworkObject.TrySetParent` method when parenting if you plan on changing the `WorldPositionStays` default value. @@ -25,10 +25,37 @@ If you aren't completely familiar with transform parenting in Unity, then it's h - When `OnNetworkObjectParentChanged` is invoked, on the server side, adjust the child's transform values within the overridden method. - Netcode for GameObjects will then synchronize all clients with the child's parenting and transform changes. +### Parenting, Distributed Authority, and NetworkObject Redistribution + +Parenting within a distributed authority network topology follows the same rules as outlined above with the minor exception that you can exchange any references to "server" with "authority". +#### Rules Adjustments: + - Whoever has authority of a `NewtworkObject` can control its parenting. + - You can parent under mixed authority. This means Client-B can parent a `NetworkObject` it is the authority over under a `NetworkObject` that Client-A has authority over. + +#### Distributable Permissions and Child Hierarchies: +- **Upon a client disconnecting:** + - Any root parent with distributable permission set and was owned by the client that disconnected will be redistributed. + -If the root parent was locked when the client disconnected, then the service should unlock it prior to redistributing. + - All children under the root parent should follow the root parent ownership change if: + - The child is owned by the client that disconnected. + - The child has either the distributable or transferable permission set. + - If the child's ownership permission is locked, then the service should unlock it prior to changing ownership. + - Any child of the root parent that is owned by a different client should not have the ownership redistributed. +- **Upon a client connecting:** + - Any root parent with the distributable permission set and does not have ownership locked should be taken into consideration for redistribution. + - If a root parent is redistributed to the newly connecting client then: + - Any child under the root parent that has the same owner as the root parent should "follow" (*i.e. change ownership with the root parent*). + - Unless the child has ownership locked (i.e. it should not have its ownership changed). + - Any child under the root parent that has the distributable or transferrable permission set can be redistributed as well. + - Unless the child has ownership locked (i.e. it should not have its ownership changed). + + :::tip When a NetworkObject is parented, Netcode for GameObjects synchronizes both the parenting information along with the child's transform values. Netcode for GameObjects uses the `WorldPositionStays` setting to decide whether to synchronize the local or world space transform values of the child NetworkObject component. This means that a NetworkObject component doesn't require you to include a NetworkTransform component if it never moves around, rotates, or changes its scale when it isn't parented. This can be beneficial for world items a player might pickup (parent the item under the player) and the item in question needs to adjustment relative to the player when it's parented or the parent is removed (dropped). This helps to reduce the item's over-all bandwidth and processing resources consumption. ::: + + ### OnNetworkObjectParentChanged [`NetworkBehaviour.OnNetworkObjectParentChanged`](https://docs.unity3d.com/Packages/com.unity.netcode.gameobjects@latest?subfolder=/api/Unity.Netcode.NetworkBehaviour.html#Unity_Netcode_NetworkBehaviour_OnNetworkObjectParentChanged_Unity_Netcode_NetworkObject_) is a virtual method you can override to be notified when a NetworkObject component's parent has changed. The [`MonoBehaviour.OnTransformParentChanged()`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnTransformParentChanged.html) method is used by NetworkObject component to catch `transform.parent` changes and notify its associated NetworkBehaviour components. From 7617c607880c37e250ad9194fdf05f8f0e243d49 Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Mon, 10 Feb 2025 15:17:23 -0600 Subject: [PATCH 02/13] style removing white space and added CRs --- docs/advanced-topics/networkobject-parenting.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/advanced-topics/networkobject-parenting.md b/docs/advanced-topics/networkobject-parenting.md index 8052b978e..aeacc5a32 100644 --- a/docs/advanced-topics/networkobject-parenting.md +++ b/docs/advanced-topics/networkobject-parenting.md @@ -8,7 +8,7 @@ description: A NetworkObject parenting solution within Netcode for GameObjects ( If you aren't completely familiar with transform parenting in Unity, then it's highly recommended to [review over the existing Unity documentation](https://docs.unity3d.com/Manual/class-Transform.html) before reading further to properly synchronize all connected clients with any change in a GameObject component's transform parented status, Netcode for GameObjects requires that the parent and child GameObject components have NetworkObject components attached to them. -### Parenting rules +### Parenting rules - Setting the parent of a child's `Transform` directly (that is, `transform.parent = childTransform;`) always uses the default `WorldPositionStays` value of `true`. - It's recommended to always use the `NetworkObject.TrySetParent` method when parenting if you plan on changing the `WorldPositionStays` default value. @@ -31,7 +31,7 @@ Parenting within a distributed authority network topology follows the same rules #### Rules Adjustments: - Whoever has authority of a `NewtworkObject` can control its parenting. - You can parent under mixed authority. This means Client-B can parent a `NetworkObject` it is the authority over under a `NetworkObject` that Client-A has authority over. - + #### Distributable Permissions and Child Hierarchies: - **Upon a client disconnecting:** - Any root parent with distributable permission set and was owned by the client that disconnected will be redistributed. @@ -54,8 +54,6 @@ Parenting within a distributed authority network topology follows the same rules When a NetworkObject is parented, Netcode for GameObjects synchronizes both the parenting information along with the child's transform values. Netcode for GameObjects uses the `WorldPositionStays` setting to decide whether to synchronize the local or world space transform values of the child NetworkObject component. This means that a NetworkObject component doesn't require you to include a NetworkTransform component if it never moves around, rotates, or changes its scale when it isn't parented. This can be beneficial for world items a player might pickup (parent the item under the player) and the item in question needs to adjustment relative to the player when it's parented or the parent is removed (dropped). This helps to reduce the item's over-all bandwidth and processing resources consumption. ::: - - ### OnNetworkObjectParentChanged [`NetworkBehaviour.OnNetworkObjectParentChanged`](https://docs.unity3d.com/Packages/com.unity.netcode.gameobjects@latest?subfolder=/api/Unity.Netcode.NetworkBehaviour.html#Unity_Netcode_NetworkBehaviour_OnNetworkObjectParentChanged_Unity_Netcode_NetworkObject_) is a virtual method you can override to be notified when a NetworkObject component's parent has changed. The [`MonoBehaviour.OnTransformParentChanged()`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnTransformParentChanged.html) method is used by NetworkObject component to catch `transform.parent` changes and notify its associated NetworkBehaviour components. From dc7c89408e3fefcd99ed71a85a397344c51848c2 Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Mon, 10 Feb 2025 15:23:22 -0600 Subject: [PATCH 03/13] update Minor adjustments to the text copy. --- .../advanced-topics/networkobject-parenting.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/advanced-topics/networkobject-parenting.md b/docs/advanced-topics/networkobject-parenting.md index aeacc5a32..7db624da6 100644 --- a/docs/advanced-topics/networkobject-parenting.md +++ b/docs/advanced-topics/networkobject-parenting.md @@ -35,19 +35,19 @@ Parenting within a distributed authority network topology follows the same rules #### Distributable Permissions and Child Hierarchies: - **Upon a client disconnecting:** - Any root parent with distributable permission set and was owned by the client that disconnected will be redistributed. - -If the root parent was locked when the client disconnected, then the service should unlock it prior to redistributing. - - All children under the root parent should follow the root parent ownership change if: + - If the root parent was locked when the client disconnected, then it will be unlocked prior to redistributing. + - All children under the root parent will "follow" the root parent ownership change only if: - The child is owned by the client that disconnected. - The child has either the distributable or transferable permission set. - - If the child's ownership permission is locked, then the service should unlock it prior to changing ownership. - - Any child of the root parent that is owned by a different client should not have the ownership redistributed. + - If a child's ownership permission is locked, it will be unlocked prior to redistributing. + - Any child of the root parent that is owned by a different client will not get redistributed. - **Upon a client connecting:** - - Any root parent with the distributable permission set and does not have ownership locked should be taken into consideration for redistribution. - - If a root parent is redistributed to the newly connecting client then: - - Any child under the root parent that has the same owner as the root parent should "follow" (*i.e. change ownership with the root parent*). - - Unless the child has ownership locked (i.e. it should not have its ownership changed). + - Any root parent with the distributable permission set and does not have ownership locked will be taken into consideration for redistribution. + - If a root parent is redistributed to a newly connecting client then: + - Any child under the root parent that has the same owner as the root parent will "follow" (*i.e. change ownership with the root parent*). + - Unless the child has ownership locked (i.e. it will not have its ownership changed). - Any child under the root parent that has the distributable or transferrable permission set can be redistributed as well. - - Unless the child has ownership locked (i.e. it should not have its ownership changed). + - Unless the child has ownership locked (i.e. it will not have its ownership changed). :::tip From e20a8d76800d0b6143b688549469144f70e9393f Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Mon, 10 Feb 2025 15:24:59 -0600 Subject: [PATCH 04/13] update Another minor adjustment to text copy. --- docs/advanced-topics/networkobject-parenting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced-topics/networkobject-parenting.md b/docs/advanced-topics/networkobject-parenting.md index 7db624da6..107849f85 100644 --- a/docs/advanced-topics/networkobject-parenting.md +++ b/docs/advanced-topics/networkobject-parenting.md @@ -30,7 +30,7 @@ If you aren't completely familiar with transform parenting in Unity, then it's h Parenting within a distributed authority network topology follows the same rules as outlined above with the minor exception that you can exchange any references to "server" with "authority". #### Rules Adjustments: - Whoever has authority of a `NewtworkObject` can control its parenting. - - You can parent under mixed authority. This means Client-B can parent a `NetworkObject` it is the authority over under a `NetworkObject` that Client-A has authority over. + - You can parent under mixed authority. This means Client-B can parent a `NetworkObject` it has authority over under another `NetworkObject` that Client-A has authority over. #### Distributable Permissions and Child Hierarchies: - **Upon a client disconnecting:** From 1ce5f9704dc3c254ac6e614586ec9bea180dfe98 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Thu, 13 Feb 2025 18:33:51 -0600 Subject: [PATCH 05/13] Update docs/advanced-topics/networkobject-parenting.md Co-authored-by: Amy Reeve --- docs/advanced-topics/networkobject-parenting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced-topics/networkobject-parenting.md b/docs/advanced-topics/networkobject-parenting.md index 107849f85..9fcbbdfb8 100644 --- a/docs/advanced-topics/networkobject-parenting.md +++ b/docs/advanced-topics/networkobject-parenting.md @@ -25,7 +25,7 @@ If you aren't completely familiar with transform parenting in Unity, then it's h - When `OnNetworkObjectParentChanged` is invoked, on the server side, adjust the child's transform values within the overridden method. - Netcode for GameObjects will then synchronize all clients with the child's parenting and transform changes. -### Parenting, Distributed Authority, and NetworkObject Redistribution +### Parenting, distributed authority, and NetworkObject redistribution Parenting within a distributed authority network topology follows the same rules as outlined above with the minor exception that you can exchange any references to "server" with "authority". #### Rules Adjustments: From 27738fb017f48267d072f86e14c3f087e5e11ad3 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Thu, 13 Feb 2025 18:34:41 -0600 Subject: [PATCH 06/13] Update docs/advanced-topics/networkobject-parenting.md Co-authored-by: Amy Reeve --- docs/advanced-topics/networkobject-parenting.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/advanced-topics/networkobject-parenting.md b/docs/advanced-topics/networkobject-parenting.md index 9fcbbdfb8..767dbd80a 100644 --- a/docs/advanced-topics/networkobject-parenting.md +++ b/docs/advanced-topics/networkobject-parenting.md @@ -27,7 +27,8 @@ If you aren't completely familiar with transform parenting in Unity, then it's h ### Parenting, distributed authority, and NetworkObject redistribution -Parenting within a distributed authority network topology follows the same rules as outlined above with the minor exception that you can exchange any references to "server" with "authority". +Parenting within a [distributed authority](../terms-concepts/distributed-authority.md) network topology follows the same rules as outlined above, with the exception that you can change any references to the server with references to authority. + #### Rules Adjustments: - Whoever has authority of a `NewtworkObject` can control its parenting. - You can parent under mixed authority. This means Client-B can parent a `NetworkObject` it has authority over under another `NetworkObject` that Client-A has authority over. From c4a3080e21dde856e9cc472d8fbab1eaf95234e1 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Thu, 13 Feb 2025 18:34:55 -0600 Subject: [PATCH 07/13] Update docs/advanced-topics/networkobject-parenting.md Co-authored-by: Amy Reeve --- docs/advanced-topics/networkobject-parenting.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/advanced-topics/networkobject-parenting.md b/docs/advanced-topics/networkobject-parenting.md index 767dbd80a..4f7395877 100644 --- a/docs/advanced-topics/networkobject-parenting.md +++ b/docs/advanced-topics/networkobject-parenting.md @@ -29,7 +29,8 @@ If you aren't completely familiar with transform parenting in Unity, then it's h Parenting within a [distributed authority](../terms-concepts/distributed-authority.md) network topology follows the same rules as outlined above, with the exception that you can change any references to the server with references to authority. -#### Rules Adjustments: +#### Rule adjustments + - Whoever has authority of a `NewtworkObject` can control its parenting. - You can parent under mixed authority. This means Client-B can parent a `NetworkObject` it has authority over under another `NetworkObject` that Client-A has authority over. From 32858cd122353193952ecc5b840b6fe8f6cc88fe Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Thu, 13 Feb 2025 18:35:13 -0600 Subject: [PATCH 08/13] Update docs/advanced-topics/networkobject-parenting.md Co-authored-by: Amy Reeve --- docs/advanced-topics/networkobject-parenting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced-topics/networkobject-parenting.md b/docs/advanced-topics/networkobject-parenting.md index 4f7395877..0564e9ae5 100644 --- a/docs/advanced-topics/networkobject-parenting.md +++ b/docs/advanced-topics/networkobject-parenting.md @@ -31,7 +31,7 @@ Parenting within a [distributed authority](../terms-concepts/distributed-authori #### Rule adjustments - - Whoever has authority of a `NewtworkObject` can control its parenting. + - Whichever client has authority over a NetworkObject can control its parenting. - You can parent under mixed authority. This means Client-B can parent a `NetworkObject` it has authority over under another `NetworkObject` that Client-A has authority over. #### Distributable Permissions and Child Hierarchies: From a49e03bab10dbffacf0eaf743c42aabe795a481b Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Thu, 13 Feb 2025 18:36:15 -0600 Subject: [PATCH 09/13] Update docs/advanced-topics/networkobject-parenting.md Co-authored-by: Amy Reeve --- docs/advanced-topics/networkobject-parenting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced-topics/networkobject-parenting.md b/docs/advanced-topics/networkobject-parenting.md index 0564e9ae5..0c924cc2e 100644 --- a/docs/advanced-topics/networkobject-parenting.md +++ b/docs/advanced-topics/networkobject-parenting.md @@ -32,7 +32,7 @@ Parenting within a [distributed authority](../terms-concepts/distributed-authori #### Rule adjustments - Whichever client has authority over a NetworkObject can control its parenting. - - You can parent under mixed authority. This means Client-B can parent a `NetworkObject` it has authority over under another `NetworkObject` that Client-A has authority over. + - You can parent under mixed authority. This means that Client-B can parent a NetworkObject it has authority over under another NetworkObject that Client-A has authority over. #### Distributable Permissions and Child Hierarchies: - **Upon a client disconnecting:** From 994e835659d833cae2e31a04075057207aea46ee Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Thu, 13 Feb 2025 18:36:22 -0600 Subject: [PATCH 10/13] Update docs/advanced-topics/networkobject-parenting.md Co-authored-by: Amy Reeve --- docs/advanced-topics/networkobject-parenting.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/advanced-topics/networkobject-parenting.md b/docs/advanced-topics/networkobject-parenting.md index 0c924cc2e..b65f1ba4a 100644 --- a/docs/advanced-topics/networkobject-parenting.md +++ b/docs/advanced-topics/networkobject-parenting.md @@ -34,7 +34,8 @@ Parenting within a [distributed authority](../terms-concepts/distributed-authori - Whichever client has authority over a NetworkObject can control its parenting. - You can parent under mixed authority. This means that Client-B can parent a NetworkObject it has authority over under another NetworkObject that Client-A has authority over. -#### Distributable Permissions and Child Hierarchies: +#### Distributable permissions and child hierarchies + - **Upon a client disconnecting:** - Any root parent with distributable permission set and was owned by the client that disconnected will be redistributed. - If the root parent was locked when the client disconnected, then it will be unlocked prior to redistributing. From fa015a87ac456245d1053d8a4b33f1fc273df497 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Thu, 13 Feb 2025 18:36:42 -0600 Subject: [PATCH 11/13] Update docs/advanced-topics/networkobject-parenting.md Co-authored-by: Amy Reeve --- docs/advanced-topics/networkobject-parenting.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/advanced-topics/networkobject-parenting.md b/docs/advanced-topics/networkobject-parenting.md index b65f1ba4a..dc3c7598b 100644 --- a/docs/advanced-topics/networkobject-parenting.md +++ b/docs/advanced-topics/networkobject-parenting.md @@ -36,14 +36,14 @@ Parenting within a [distributed authority](../terms-concepts/distributed-authori #### Distributable permissions and child hierarchies -- **Upon a client disconnecting:** - - Any root parent with distributable permission set and was owned by the client that disconnected will be redistributed. - - If the root parent was locked when the client disconnected, then it will be unlocked prior to redistributing. - - All children under the root parent will "follow" the root parent ownership change only if: - - The child is owned by the client that disconnected. +- **When a client disconnects:** + - Any root parent with [distributable permission](../basics/ownership.md#ownership-permission-settings) set that was owned by the disconnected client is redistributed. + - If the root parent was locked when the client disconnected, then it's unlocked prior to redistributing. + - Children of the root parent change ownership with the root parent only if: + - The child was owned by the client that disconnected. - The child has either the distributable or transferable permission set. - - If a child's ownership permission is locked, it will be unlocked prior to redistributing. - - Any child of the root parent that is owned by a different client will not get redistributed. + - If a child's ownership permission is locked, it's unlocked prior to redistributing. + - Any child of the root parent that's owned by a different client won't get redistributed. - **Upon a client connecting:** - Any root parent with the distributable permission set and does not have ownership locked will be taken into consideration for redistribution. - If a root parent is redistributed to a newly connecting client then: From 6ac923205a415756ed3b3fc874cd030cbe8f35ed Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Thu, 13 Feb 2025 18:36:57 -0600 Subject: [PATCH 12/13] Update docs/advanced-topics/networkobject-parenting.md Co-authored-by: Amy Reeve --- docs/advanced-topics/networkobject-parenting.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/advanced-topics/networkobject-parenting.md b/docs/advanced-topics/networkobject-parenting.md index dc3c7598b..f0c6e3a99 100644 --- a/docs/advanced-topics/networkobject-parenting.md +++ b/docs/advanced-topics/networkobject-parenting.md @@ -44,14 +44,13 @@ Parenting within a [distributed authority](../terms-concepts/distributed-authori - The child has either the distributable or transferable permission set. - If a child's ownership permission is locked, it's unlocked prior to redistributing. - Any child of the root parent that's owned by a different client won't get redistributed. -- **Upon a client connecting:** - - Any root parent with the distributable permission set and does not have ownership locked will be taken into consideration for redistribution. +- **When a client connects:** + - Any root parent with [distributable permission](../basics/ownership.md#ownership-permission-settings) set that doesn't have ownership locked is considered for redistribution. - If a root parent is redistributed to a newly connecting client then: - - Any child under the root parent that has the same owner as the root parent will "follow" (*i.e. change ownership with the root parent*). - - Unless the child has ownership locked (i.e. it will not have its ownership changed). + - Any child under the root parent that has the same owner as the root parent changes ownership with the root parent. + - Unless the child has ownership locked. - Any child under the root parent that has the distributable or transferrable permission set can be redistributed as well. - - Unless the child has ownership locked (i.e. it will not have its ownership changed). - + - Unless the child has ownership locked. :::tip When a NetworkObject is parented, Netcode for GameObjects synchronizes both the parenting information along with the child's transform values. Netcode for GameObjects uses the `WorldPositionStays` setting to decide whether to synchronize the local or world space transform values of the child NetworkObject component. This means that a NetworkObject component doesn't require you to include a NetworkTransform component if it never moves around, rotates, or changes its scale when it isn't parented. This can be beneficial for world items a player might pickup (parent the item under the player) and the item in question needs to adjustment relative to the player when it's parented or the parent is removed (dropped). This helps to reduce the item's over-all bandwidth and processing resources consumption. From 7b9512c40f8ba3192002c3d2e76b4b5ed2422e43 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Tue, 18 Feb 2025 15:39:00 -0600 Subject: [PATCH 13/13] Update networkobject-parenting.md Updating the rules a bit in regards to in-scene placed objects. --- docs/advanced-topics/networkobject-parenting.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/advanced-topics/networkobject-parenting.md b/docs/advanced-topics/networkobject-parenting.md index f0c6e3a99..db10a24ce 100644 --- a/docs/advanced-topics/networkobject-parenting.md +++ b/docs/advanced-topics/networkobject-parenting.md @@ -52,6 +52,10 @@ Parenting within a [distributed authority](../terms-concepts/distributed-authori - Any child under the root parent that has the distributable or transferrable permission set can be redistributed as well. - Unless the child has ownership locked. +#### Distributable permissions and in-scene placed `NetworkObject` instances: +By default, any root in-scnee placed `NetworkObject` instance will have the `Distributable` permissions flag unless it already has the `SessionOwner` permission flag set. This assures in-scene placed `NetworkObject` instances will always distributed amongst clients or a newly promoted session owner. + + :::tip When a NetworkObject is parented, Netcode for GameObjects synchronizes both the parenting information along with the child's transform values. Netcode for GameObjects uses the `WorldPositionStays` setting to decide whether to synchronize the local or world space transform values of the child NetworkObject component. This means that a NetworkObject component doesn't require you to include a NetworkTransform component if it never moves around, rotates, or changes its scale when it isn't parented. This can be beneficial for world items a player might pickup (parent the item under the player) and the item in question needs to adjustment relative to the player when it's parented or the parent is removed (dropped). This helps to reduce the item's over-all bandwidth and processing resources consumption. :::