* integrate multi-machine testing code
* Reconfigure how host/client ip/port is set
* PR feedback
* Undetected compilation error
* update to use async await
* use async await
* Use async/await and avoid call to Wait()
* Clean up whitespace as well as remove calls to Wait()
* only whitespace
* attempt to move setting up StartClient to support async config
* Continued experiments
* Start client after the configuration has been set
* Use notifications and callbacks instead of waits to enable TestCoordinator when the connection is complete
* Make startclient call explicit
* Test Coordinator cleanup for INotifyPropertyChanged
* Fix whitespace
* Fix whitespace, simplify
Co-authored-by: Noel Stephens <noel.stephens@unity3d.com>
* fix
MTT-3580
This resolves the issue with the active scene and any additively loaded scenes not sending scene event notifications to inform the user that the scenes did, indeed, unload.
* Update CHANGELOG.md
* Update CHANGELOG.md
* Update CHANGELOG.md
* test - NetworkSceneManagerEventNotifications - update
Added some additional tests for switch scene notifications for additively loaded scenes and the currently active scene.
* update
Minor update to NetworkSceneManager.SceneUnloadEventHandler to deal with the scenario where a scene is unloaded but NetworkManager has already shutdown.
* update
Final changelog update.
MTT-3580
* update
Added some shutdown code to make sure SceneUnloadEventHandler cleans up after itself in the event a large scene is in the middle of loading and the player exits the current game-session.
Cleaned up some comments.
Cleaned up some debug output in the NetworkSceneManagerEventNotifications test.
* fix
Fix for animators that have one layer and handle most animation state changes via properties.
* test and style
Adding an integration test to validate the changes.
Updated comments in NetworkAnimator.
* style
MTT-3492
Remove namespace references I was not using.
* style
only applying changes required for asmdef file.
* update and test
Removed the duplicate tracking for parameters.
Added the ability to make it owner or server authoritative.
Included triggers in this update.
Added test for triggers.
* style
* update
removing unused parameter state class
* update and fix
This updates the manual animation test so we can visually see NetworkAnimator working properly.
This fixes the issue where late joining clients would not be updated to the NetworkAnimator's state.
This fixes some test project asset related issues including to make sure we are always set to run in the background and have a target fps of 120.
* update and fix
This fixes the issue where it would sometimes not clean up/dispose the "cache" native array.
This improves the client synchronization (as best for the current way that we write information).
Manual Test Updates:
This fixes an issue with scale as well as getting other players to join and distribute evenly.
This fixes the issue with the prefab asset itself (scale issue impacted pulse).
Increased send/receive buffer sizes (we send a lot of data for animations currently)
* update
Making CleanUp private.
* fix
This lost its parameters for some reason...
* fix
Missed adding the trigger state back.
* test
This verifies that late joining clients get synchronized to the current NetworkAnimator state.
This also fixes the issue where stopping a client during an integration test always meant that you wanted to delete it. Now, you have the option to not destroy in the event you want to stop a client, do some stuff, and then reconnect the client.
* test and style
Minor tweak and additional check that the AnimatorTestHelper instances equals the TotalClient count (more of a sanity check).
Added some comments and removed some LFs.
* Test and Style
I hooked up the TriggerTest to the wrong state. Fixed issue by creating a new state that is activated by the test trigger.
Changing the warning to an actual error in TriggerTest (i.e. if that happens the test should fail).
* Update
This includes several adjustments to improve performance.
-Parameters are now sent separately
-New internal NetworkAnimatorStateChangeHandler that changes when:
-It detects changes to the Animator
-The server-side client forwarded RPC messages are processed here
-Removed the OwnerAuthoritative public bool
This also include integration test adjustments in order to be able to create and join a new client on the fly during a test.
* fix
This got test running locally in a stand alone testrunner build.
Going to give this a shot in Yamato land.
* wip
Sorting out the issue with server-side owner late joining client synchronization. This version works with all tests ==but== the server-side owner late joining client portion... still trying to find this bug.
* fix
This reverts Triggers back to being set by an RPC (better to separate for now).
This also fixes minor issues with a player joining right in the middle of a transition.
This also fixes issue where trigger paths were not being set when transitioning (still could use more work).
This fixes the issue with the NetworkAnimator failing on the late joining player test where the late joining player could join while an Animator is in the middle of a transition.
* style
* style
* update
This improves upon the synchronization of a late joining client when connected while an animation is in the middle of a transition (it doesn't fix the issue completely, but is closer to being synchronized with the source animation)
* update
Removing VerboseDebug information
* Test
Added a small profiling test to profile where we spend time.
(sending RPCs)
* update - optimize
Optimizing how we send parameter updates. Now we only send the parameters that changed.
This also avoids some smaller allocations by reusing a ClientRpcParams instance and a List<ulong> to hold the client ids to send to.
* style
updating a missed whitespace
* update
MTT-3492 MTT-2644
Updating what was fixed in the change log.
* update
Minor tweaks suggested by Fatih.
* fix
NCCBUG-167
This fixes the issue with the type (T) casting throwing an exception when the type is not found (i.e. trying to cast a type to null will asset...trying to get the result of getting a type as (T) will still return null.
* update
adding the changelog entry
* test
This test verifies the fix.
* update
adding PR number to the change log entry
* test
This allows me to test this bug to verify it is no longer happening.
* fix
This fixes the issue where if a client disconnects during a scene event it would not get completed.
This will also fix an exception on the client side where if the client was disconnected during a scene event while in the middle of loading or unloading a scene it will not try to continue processing the event.
* test
This includes the integration test that validates the fix.
This also includes some minor adjustments to the integration test scene handler to account for handling a client disconnecting in the middle of a scene loading event.
* Update CHANGELOG.md
* update
MTT-3396
Adding additional code that tracks the initial clients that were connected when the scene event starts in order to provide an accurate list of clients that timed out during scene loading.
Cleaned up some of the code in the integration test as well as added additional comments.
* Update CHANGELOG.md
* Update com.unity.netcode.gameobjects/Runtime/SceneManagement/SceneEventProgress.cs
Co-authored-by: LPLafontaineB <louisphilippe.lb@unity.com>
* fix
Fixing an issue where if a virtual mac machine was running slower than expected it would time out on certain deferred message tests. The primary area impacted was WaitForMessageOfTypeReceived which seemed to not use the DefaultTimeout value but 0.5s as the maximum time it would wait for the message.
This just changes the timeout to the Default timeout for WaitForMessageOfTypeReceived and I noticed WaitForMessageOfTypeHandled used 0.5s for the default time out period and set that to use the DefaultTimeout.
* fix
increasing the timeout period.
Co-authored-by: LPLafontaineB <louisphilippe.lb@unity.com>
* chore: making NetworkTransform's interpolation bounds configurable.
Fixes an intermittent test breakage due to extrapolation bringing us out-of-bounds
* style: coding standard adjustments
* feat: Add "RemoveNetworkPrefab" which is necessary for certain addressables implementations
* changelog
* tests
* - Added XMLDoc
- Enforced not removing prefabs when ForceSamePrefabs is enabled.
Co-authored-by: Fatih Mar <mfatihmar@gmail.com>
* update
xml documentation to be included in API documentation that one should not try to start a new scene event within a scene event notification callback.
* update
one more location just to make sure.
* Update com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs
Co-authored-by: Fatih Mar <mfatihmar@gmail.com>
Co-authored-by: Fatih Mar <mfatihmar@gmail.com>
* fix
MTT-3552
This fixes the issue with NetworkHide not being updated to changes in DestroyObjectMessage.
* test
This updates the NetworkShowHideTests to verify the GameObject is indeed destroyed on the client side when hidden.
It also fixes a few other potential timing issues and cleaned up some of the code to leverage from more recent updates to NetcodeIntegrationTest.
* fix
MTT-3252
This fixes the endless dialog loop issue.
* style
updating comments and the dialog text copy.
* Update CHANGELOG.md
Co-authored-by: Unity Netcode CI <74025435+netcode-ci-service@users.noreply.github.com>
* fix
MTT-2924
This is the first pass at solving the issue where late joining clients are not synchronized properly with despawned in-scene NetworkObjects.
* Update CHANGELOG.md
* Update CHANGELOG.md
* fix
This allows for respawning of in-scene placed NetworkObjects without having to register them with the NetworkManager.
* Update CHANGELOG.md
* style
* Update CHANGELOG.md
* style
whitespace fixes.
* fix
Passing the entire SceneObject structure as opposed to adding more parameters to the NetworkSpawnManager.HasPrefab method in order to be able to extract the NetworkSceneHandle and include the in-scene placed NetworkObjects as part of the "prefabs to search for".
* update
This is some work towards integration tests where clients might be able to actually load scenes as opposed to fake loading them
* fix
Fixed some minor issues with tests.
Updated HiddenVariableTests as it needed some timing related adjustments.
* Update NetworkSceneManagerEventDataPoolTest.cs
* style
* style
* test - integration test clients now load scenes
This update allows for clients to load scenes and synchronize in-scene placed NetworkObjects during integration testing.
* test - fix
Now that clients are loading scenes, needed to make some minor adjustments.
* test - fix
Realized I don't need to simulate client loading delay unless the client is blocked from loading.
Also had to adjust whether the metrics tests waited for the client or not when loading.
* fix
Fixes an issue that can occur where this becomes enabled in test runner and will throw an exception if target is null.
* fix - NetworkSceneManager.GetSceneRelativeInSceneNetworkObject
GetSceneRelativeInSceneNetworkObject needed to get the sceneHandle before checking for it existing in the ScenePlacedObjects.
* fix - AddDespawnedInSceneNetworkObjects
AddDespawnedInSceneNetworkObjects needed to only return despawned NetworkObjects belonging to the NetworkManager.
* test - fix - Integration test client scene loading
This fixes some of the last edge case scenarios such as:
- Not loading scenes for clients when a non-NetcodeIntegrationTest based integration test is running since this does require some additional management and cleanup.
- Assuring that in-scene NetworkObjects have the right NetworkManager assigned when loaded
- Added a check to assure that it didn't time out while waiting for all clients to connect
- Increased the NetcodeIntegrationTestHelpers default timeout to 2s vs 1s (clients loading scenes can slow down when things happen)
- NetcodeIntegrationTests now unload all scenes loaded (but the test runner scene) during teardown and onetimeteardown.
* test update
Just adding timeout checks in both NetworkVariableTests and TimeMultiInstanceTest
* test assets
Updating some of the assets used for integration testing now that clients are loading scenes too.
* test fix
Changing the scenes being loaded to avoid integration test specific SDK architecture related issues.
* test fix
An early shutdown was not needed here
* test fix
Disabling the audio listener in the EmptyScene to reduce console spam during integration tests.
* test fix
Fixing edge case timing issue with MessageOrdering.
* test InScenePlacedNetworkObjects
This is the integration test for this PR.
It tests late joining client synchronization with despawned NetworkObjects and tests that in-scene placed NetworkObjects do not need to be registered with the NetworkManager to be spawned.
* fix
Don't throw an exception when calling GetObservers or IsNetworkVisibleTo when the NetworkObject is not spawned.
* fix
fixing typo/mistake for the scene to be unloaded.
* style
* Update ObjectNameIdentifier.cs
* style
* style
updating comments and removing LFs and some commented out code.
* update and style
updating comments and minor final tweaks.
* update
minor changes suggested by Jeffrey R.
* update
removing scene management specific code from places where scene management is disabled.
* style
updated some comments
* fix
Fixing an issue where CheckValueOnClient was crashing. Integration test timing did change slightly now that clients load scenes, so it was possible that the key would not exist by the time it was being checked.
* fix consoles
reducing the number of clients from 9 to 4 in some of the NetworkSceneManager related tests as I think it impacted performance enough to cause clients to take longer than the default timeout of 2 seconds.
* fix
Hopefully this will fix the issue with Xbox Scarlett
* test - fix
Removing m_CanCheckLoadUnloadEvents as that was a sanity check while I was testing clients loading scenes. This could possibly fix an edge case scenario issue where a message might get ignored.
* update
removing NetworkSceneHandle from NetworkObject as it was not needed.
* Update CHANGELOG.md
* update
Removing wait for clients to unload scenes and unloading them via SceneManager as the test has already completed and this is more clean up than anything else.
* test update
Removed the crazy code in ObjectNameIdentifier for adding tag information and simplified it by storing the original name and using that each time it needs to regenerate the tag information.
Moved where the NetworkManager name and tag information is applied to get the right client id.
Added additional debug information.
* style
* test
Testing with verbose mode to see why this passes on Windows 10 in a stand alone build and in the editor but fails on Yamato desktops.
* test
adding more debug info.
* test fix
Looks like the scene isn't really loaded when it says it is loaded.
Moving when the NetworkSceneManager's callback is invoked and adding delay before invoking.
* test fix
Making some additional modifications to see if it was when the NetworkSceneManager scene Load/Unload event action is invoked and reducing the number of clients to 1.
* Test Fix
Minor tweaks and merging develop into this branch.
* test fix
Found a bug in some recent changes that would cause a crash under specific scenarios.
* fix
* test and style
Went back through some of the changed files and removed some code no longer needed, extended some of the verbose debug info for any future debugging purposes, and updated some of the comments.
* style
removing commented out code.
* chore: cleaning up connected clients upon shutdown [MTT-1573]
* chore: cleaning up connected clients upon shutdown [MTT-1573] changelog
* Update com.unity.netcode.gameobjects/CHANGELOG.md
Co-authored-by: Fatih Mar <mfatihmar@gmail.com>
* fix: allowing quick NetworkHide and NetworkShow [MTT-3488]
* fix: allowing quick NetworkHide and NetworkShow [MTT-3488] changelog and tests
* fix: allowing quick NetworkHide and NetworkShow [MTT-3488] test timing based on ticks
* fix: Clearing TransportEvent delegate event when failing to host. Fixes an issue where hosting again after hosting with invalid params would result in doubly-delivered messages followed by time-out
* fix: Clearing TransportEvent delegate (changelog)
Add more detail to where in the process the setting takes effect, how it relates to transport-level timeouts and indicates that it's a server-side setting only.