-
Notifications
You must be signed in to change notification settings - Fork 450
fix: SceneEventProgress was triggering twice when running a host and no clients were connected #2292
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
Merged
NoelStephensUnity
merged 11 commits into
develop
from
fix/sceneeventprogress-triggerstwice-onhost-noconnectedclients
Nov 3, 2022
Merged
fix: SceneEventProgress was triggering twice when running a host and no clients were connected #2292
NoelStephensUnity
merged 11 commits into
develop
from
fix/sceneeventprogress-triggerstwice-onhost-noconnectedclients
Nov 3, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jeffreyrainy
approved these changes
Nov 1, 2022
…st-noconnectedclients
GetClientsWithStatus needed to add the host-client to the list of clients that completed once the scene event was completed. Also fixed a bug in GetClientsWithStatus where, when checking for clients that did not complete, it would include the clients that completed and the clients that did not complete in the list of client identifiers it returned.
Removing unnecessary check for a null AsyncOperation and adding additional comments
The updates to SceneEventProgress exposed an issue with this integration test. It was written before many NetcodeIntegrationTest helpers, so there are adjustments here to leverage from those which greatly simplifies the test. Also, once this test and SceneEventProgress issues were resolved it exposed a potential QoL item where if a client does not validate a scene that contains in-scene placed NetworkObjects then it will cause a soft synchronization error on the client side. I switched the scene that was not validated by the client-side to one that did not contain an in-scene placed NetworkObject to avoid this issue and to validate that a client can ignore loading a scene (as long as it does not have any in-scene placed NetworkObjects in it).
…st-noconnectedclients
jakobbbb
pushed a commit
to GooseGirlGames/com.unity.netcode.gameobjects
that referenced
this pull request
Feb 22, 2023
…no clients were connected (Unity-Technologies#2292) * fix Exclude the host-client from being processed as one of the clients to test for when the scene event has completed. GetClientsWithStatus needed to add the host-client to the list of clients that completed once the scene event was completed. Also fixed a bug in GetClientsWithStatus where, when checking for clients that did not complete, it would include the clients that completed and the clients that did not complete in the list of client identifiers it returned. Fixing issue where integration tests could lag by more than 1 network tick and the AsyncOperation could not yet be assigned. * test Added HostReceivesOneLoadEventCompletedNotification integration test to validate the fix for this PR. Updated NetcodeIntegrationTest virtual methods to be able to gain access to a newly created client (via NetcodeIntegrationTest.CreateAndStartNewClient) when it is first created, started, and when it has been connected. The updates to SceneEventProgress exposed an issue with ClientSynchronizationValidationTest. It was written before many NetcodeIntegrationTest helpers, so there are adjustments here to leverage from those which greatly simplifies the test. Switched the scene that was not validated by the client-side to one that did not contain an in-scene placed NetworkObject. Co-authored-by: Unity Netcode CI <74025435+netcode-ci-service@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When running as a host with no other clients connected and loading or unloading a scene via
NetworkSceneManager
,SceneEventProgress
would trigger twice causingNetworkSceneManager
to invoke notifications of the same scene event having completed twice.MTT-5010
Issue #2283.
Changelog
Testing and Documentation