Skip to content

Conversation

@NoelStephensUnity
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity commented Oct 28, 2025

Purpose of this PR

Fixing issue discovered in asteroids manual test where the server-side would just continue to add each disconnect reason to the previous one but only if the server force disconnected each client.

Jira ticket

NA

Changelog

NA

Documentation

  • No documentation changes or additions were necessary.

Testing & QA (How your changes can be verified during release Playtest)

Functional Testing

Manual testing :

  • [ X ] Manual testing done
    • Using internal asteroids manual test

Automated tests:

  • [ X ] Covered by existing automated tests
    • Modified the disconnect test.
  • Covered by new automated tests

Does the change require QA team to:

  • Review automated tests?
  • Execute manual tests?
  • Provide feedback about the PR?

If any boxes above are checked the QA team will be automatically added as a PR reviewer.

Backports

This will be backported to develop-2.0.0 after NGOv2.7.0 release

Reset the disconnect reason when the server-side is disconnecting a client.
Updating the disconnect test to validate that the disconnect reason is reset when a server force disconnects a client.
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner October 28, 2025 00:04
@michalChrobot michalChrobot merged commit 1d04a27 into release/2.7.0 Oct 28, 2025
22 of 23 checks passed
@michalChrobot michalChrobot deleted the fix/clear-disconnectreason-on-diconnect branch October 28, 2025 09:02
NoelStephensUnity added a commit that referenced this pull request Oct 31, 2025
* fix

Reset the disconnect reason when the server-side is disconnecting a client.

* test

Updating the disconnect test to validate that the disconnect reason is reset when a server force disconnects a client.
NoelStephensUnity added a commit that referenced this pull request Oct 31, 2025
* Merge branch 'release/2.7.0' of https://github.com/Unity-Technologies/com.unity.netcode.gameobjects into release/2.7.0

* fix - revert

Reverting changes made in 3664 with the time used when interpolating to local time.
Added additional comments to prevent future fiddling with that (whether to use local or server time).

* fix: Compilation error when using an RpcAttribute with RequireOwnership (#3750)

* fix: clear DisconnectReason on server-side disconnect client (#3751)

* fix

Reset the disconnect reason when the server-side is disconnecting a client.

* test

Updating the disconnect test to validate that the disconnect reason is reset when a server force disconnects a client.

* fix: Disabled Networkbehaviours are not excluded from NetworkObject.ChildNetworkBehaviours (#3756)

* fix

This resolves the issue where a disabled NetworkBehaviour was being included in the ChildNetworkBehaviours list which would cause an exception upon a client attempting to synchronize.

* update

Adding a warning generation method to make testing easier.

* test

Modifying the original test for this to assure it checks for the correct error message.

* test - refactor

Adding a bit more coverage to the `ValidatedDisableddNetworkBehaviourWarning` test so it validates that when either a child GameObject is set inactive or the NetworkBehaviiour itself is disabled the warning message is generated and the network prefab still spawns and synchronizes.

* fix: disconnect reason should not duplicate any information (#3757)

* fix

Fixing issue with duplicated disconnect reasons for all cases.

* test - update

Making adjustments to the validation logic checking to determine if a server's disconnect reason is included in the NetworkManager.DisconnectReaon property.

* style

Removing a trailing whitespace

* test - update

One more area that needs to check for the server reason but not be a 1:1 due to the additional disconnect information before it.

* fix: disabled NetworkBehaviours vs disabled GameObjects and tests excluded by lack of MP tools (#3761)

* fix

Use the GameObject.activeInHierarchy fix.
Allow disabled NetworkBehaviour with a disabled GameObject to internally start pre-spawn but exit before invoking protected method.

* test - update

Re-factoring this test to align with the previously committed fix.

* tests - enable

Now that we have included the Mutliplayer Tools package in the test project, we needed to remove the !MULTIPLAYER_TOOLS check to assure these tests are actually being run.

* fix: Ensure DisconnectReason remains parsable (#3766)

* fix: NetworkAnimator initialization sequencing (#3767)

* fix: NetworkAnimator initialization sequencing

* Update changelog

* fix: 2.7.0 test instabilities (#3768)

* test - fix

Resolving the PeerDisconnectCallbackTests instability where sometimes the disconnect notification is processed prior to the targeted client's NetworkManager having completely disconnected and shutdown (this would only have a chance of happening if server disconnects the client).

Hoping to resolve the instability with the ParentingInSceneObjectsTests resulting in a false failure.

* test fix

Fixing potential cause for instabilities on this set of tests due to the initial network prefab transform settings not being applied to the prefab but applied to the spawned instances which could be causing issues since they were being applied to the non-authority instances.

This fix moves the applied test NetworkTrransform settings to the player prefab prior to spawning any instances.

---------

Co-authored-by: Emma <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants