Skip to content

Commit b52e907

Browse files
Merge branch 'develop-2.0.0' into chore/findobjectsbytype-no-more-sorting-update
2 parents a5983f7 + 6f48d4f commit b52e907

File tree

6 files changed

+330
-380
lines changed

6 files changed

+330
-380
lines changed

com.unity.netcode.gameobjects/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ Additional documentation and release notes are available at [Multiplayer Documen
1010

1111
### Added
1212

13+
- Added stricter checks on `InSpawned` within `NetworkObject`. (#3831)
14+
- Added a new `InvalidOperation` status to `OwnershipRequestStatus`. (#3831)
1315

1416
### Changed
1517

18+
- Ensure logs in `NetworkObject` log the `NetworkObject.name` wherever possible. (#3831)
1619
- Improved performance of NetworkBehaviour ILPostProcessor by omitting unnecessary type and assembly resolutions. (#3827)
17-
- Improve performance of `NetworkObject`. (#3820)
20+
- Improve performance of `NetworkObject`. (#3820, #3831)
1821
- If the Unity Transport Disconnect Timeout is set to 0 in the Editor, the timeout will be entirely disabled. (#3810)
1922

2023
### Deprecated

com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3719,14 +3719,9 @@ private void InternalInitialization(bool isOwnershipChange = false)
37193719
{
37203720
if (CanCommitToTransform)
37213721
{
3722-
if (NetworkObject.HasParentNetworkObject(transform))
3723-
{
3724-
InLocalSpace = true;
3725-
}
3726-
else
3727-
{
3728-
InLocalSpace = false;
3729-
}
3722+
// If our NetworkObject has a parent NetworkObject, then we are in netcode local space.
3723+
// GetComponentsInParent will get the networkObject on cachedNetworkObject as well, so we have a parent if we have more than one returned NetworkObject.
3724+
InLocalSpace = m_CachedNetworkObject.transform.GetComponentsInParent<NetworkObject>().Length > 1;
37303725
}
37313726

37323727
// Always apply this if SwitchTransformSpaceWhenParented is set.

0 commit comments

Comments
 (0)