Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merge 1.12.1 and 1.12.2 into develop #3213

Merged
merged 8 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion com.unity.netcode.gameobjects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@ Additional documentation and release notes are available at [Multiplayer Documen

### Fixed

### Changed


## [1.12.2] - 2025-01-17

### Fixed

- Fixed issue where `NetworkVariableBase` derived classes were not being re-initialized if the associated `NetworkObject` instance was not destroyed and re-spawned. (#3217)
- 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. (#3202)
- Fixed issue where `NetworkRigidBody2D` was still using the deprecated `isKinematic` property in Unity versions 2022.3 and newer. (#3199)
- Fixed issue where an exception was thrown when calling `NetworkManager.Shutdown` after calling `UnityTransport.Shutdown`. (#3118)

### Changed

- Changed the `NetworkTimeSystem.Sync` method to use half RTT to calculate the desired local time offset as opposed to the full RTT. (#3206)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,13 @@ public override void DisconnectLocalClient()
/// <param name="clientId">The client to disconnect</param>
public override void DisconnectRemoteClient(ulong clientId)
{
Debug.Assert(m_State == State.Listening, "DisconnectRemoteClient should be called on a listening server");
#if DEBUG
if (m_State != State.Listening)
{
Debug.LogWarning($"{nameof(DisconnectRemoteClient)} should only be called on a listening server!");
return;
}
#endif

if (m_State == State.Listening)
{
Expand Down Expand Up @@ -1239,7 +1245,13 @@ public NetworkEndpoint GetEndpoint(ulong clientId)
/// <param name="networkManager">The NetworkManager that initialized and owns the transport</param>
public override void Initialize(NetworkManager networkManager = null)
{
Debug.Assert(sizeof(ulong) == UnsafeUtility.SizeOf<NetworkConnection>(), "Netcode connection id size does not match UTP connection id size");
#if DEBUG
if (sizeof(ulong) != UnsafeUtility.SizeOf<NetworkConnection>())
{
Debug.LogWarning($"Netcode connection id size {sizeof(ulong)} does not match UTP connection id size {UnsafeUtility.SizeOf<NetworkConnection>()}!");
return;
}
#endif

NetworkManager = networkManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ public IEnumerator DoesNotActAfterShutdown([Values] AfterShutdownAction afterShu
{
m_Server.DisconnectRemoteClient(m_Client1.ServerClientId);

LogAssert.Expect(LogType.Assert, "DisconnectRemoteClient should be called on a listening server");
LogAssert.Expect(LogType.Warning, $"{nameof(UnityTransport.DisconnectRemoteClient)} should only be called on a listening server!");
}
else if (afterShutdownAction == AfterShutdownAction.DisconnectLocalClient)
{
Expand Down
2 changes: 1 addition & 1 deletion com.unity.netcode.gameobjects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "com.unity.netcode.gameobjects",
"displayName": "Netcode for GameObjects",
"description": "Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.",
"version": "1.12.0",
"version": "1.12.2",
"unity": "2021.3",
"dependencies": {
"com.unity.nuget.mono-cecil": "1.10.1",
Expand Down