You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: distribute parented children distributing with root parent (#3203)
* fix
This is the initial fix for distributing parented children that have the distributable and/or transferrable permissions set and have the same owner as the root parent, that has the distributable permission set, upon the owning client disconnecting when using a distributed authority network topology.
* update
Adding initial change log entry.
* update
adding PR number to entry
* update
Handle check for parent earlier.
Add additional comment details.
* fix
Adding DAHost side object hierarchy redistribution when a client disconnects.
Adding a DA specific work around for integration testing when instantiating and spawning a player within the test runner scene.
* test
The test to validate these changes using a DAHost.
* style
Removing white spaces
* test
Adding ownership locking to the test.
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/CHANGELOG.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -14,12 +14,13 @@ Additional documentation and release notes are available at [Multiplayer Documen
14
14
15
15
- Fixed exception being thrown when a `GameObject` with an associated `NetworkTransform` is disabled. (#3243)
16
16
- Fixed `NetworkObject.DeferDespawn` to respect the `DestroyGameObject` parameter. (#3219)
17
-
-Changed the `NetworkTimeSystem.Sync` method to use half RTT to calculate the desired local time offset as opposed to the full RTT. (#3212)
17
+
-Fixed issue with distributing parented children that have the distributable and/or transferrable permissions set and have the same owner as the root parent, that has the distributable permission set, were not being distributed to the same client upon the owning client disconnecting when using a distributed authority network topology. (#3203)
18
18
- Fixed issue where a spawned `NetworkObject` that was registered with a prefab handler and owned by a client would invoke destroy more than once on the host-server side if the client disconnected while the `NetworkObject` was still spawned. (#3200)
19
19
- Fixed issue where `NetworkVariableBase` derived classes were not being re-initialized if the associated `NetworkObject` instance was not destroyed and re-spawned. (#3181)
20
20
21
21
### Changed
22
22
23
+
- Changed the `NetworkTimeSystem.Sync` method to use half RTT to calculate the desired local time offset as opposed to the full RTT. (#3212)
// We have to check if it is an in-scene placed NetworkObject and if it is get the source prefab asset GlobalObjectIdHash value of the in-scene placed instance
1769
1777
// since all in-scene placed instances use unique GlobalObjectIdHash values.
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)}!");
1904
+
continue;
1905
+
}
1906
+
// Transfer ownership of all distributable =or= transferrable children with the same owner to the same client to preserve the sibling ownership tree.
1907
+
ChangeOwnership(child,clientId,true);
1908
+
// Note: We don't increment the distributed count for these children as they are skipped when getting the object distribution
0 commit comments