-
Notifications
You must be signed in to change notification settings - Fork 450
test: MTT-640 and PR-749 Companion Tests #753
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
Closed
Closed
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
* test: Added BitStream and Arithmetic tests * refactor: test cleanup * fix issues after merging develop branch Co-authored-by: Matt Walsh <69258106+mattwalsh-unity@users.noreply.github.com> Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com>
* revert: Add NetworkAddress and NetworkPort properties to Transport. (#512) (#529) This reverts commit feea3c1. * test: expose runtime internals to runtime tests asmdef (#534) * ci: enable yamato on PRs targeting master, develop and release/* branches (#535) * ci: enable yamato on PRs targeting the release/0.1.0 branch * update branch targets: master, develop, release/* * replace 'release/*' regex match with 'release/*' pattern match * ci: enable conventional PR checks on PRs targeting release branches (#536) * ci: enable conventional PR checks on release branches * remove release/* wildcard since release/** covers all * fix: Correctly collecting and drawing counters on dynamic modules (#539) * refactor: Improve error messages for NetworkPrefab list. (#538) * refactor: Refactor spawncall and improve error handling for client side spawning (#537) * fix: re-fix yamato release branch wildcard regex (#542) * fix: NetworkWriter.WriteObjectPacked to call WriteBool instead of WriteBit when serializing bool object (#541) * fix: revert Application.isPlaying check in NetworkScenePostProcess (#550) * test: implement test for NetworkUpdateLoop injecting NetworkUpdateStages into the PlayerLoop (#554) * initial wip * implement networkupdatestage injection test * refactor: rename spawn/destroy register/unregister methods (#551) * test: implement extra features on top of existing NetworkUpdateLoopTests to cover other test cases (#559) * implement extra features on top of existing tests to cover other test cases too * minor update Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> Co-authored-by: Jean-Sébastien Fauteux <js.fauteux@unity3d.com> Co-authored-by: Luke Stampfli <43687322+LukeStampfli@users.noreply.github.com>
* bugfix: If something causes an exception its possible that the profiler never allocates data. in these cases there is no point in rendering. * Actually just prevent the receiver from getting the event * Added a warning if there are expected listeners and we failed to collect data * log message tweak * typo Co-authored-by: Matt Walsh <matt.walsh@unity3d.com>
…to-develop-mergeback
…p-mergeback chore: merge release0.1.0 back to mainline, pt 2
Runs CI against trunk for our defined SDK assemblies.
* fix: remove singleton references This removes the NetworkManager.Singleton dependencies from within the RpcQueueContainer and RpcQueueProcessor classes. This further strengthens the RPC Queue system as a whole, will allow for multiple instances if RpcQueueContainer, removes a limitation I set in NetworkWriter.ReadAndWrite, and provides unit testing capabilities required for new RPC Queue unit Tests. * Update com.unity.multiplayer.mlapi/Runtime/Messaging/RpcQueue/RpcQueueContainer.cs Good catch! Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * Fix: Weird Merging Artifact? Looks like there were some remaining NumberOfRPCsSent vs RpcSent conversions. Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com>
* fix: remove singleton references This removes the NetworkManager.Singleton dependencies from within the RpcQueueContainer and RpcQueueProcessor classes. This further strengthens the RPC Queue system as a whole, will allow for multiple instances if RpcQueueContainer, removes a limitation I set in NetworkWriter.ReadAndWrite, and provides unit testing capabilities required for new RPC Queue unit Tests. * test: rpc queue tests The new rpc queue tests without all of the extra files associated with them. * fix: Merging Artifact This is the merging artifact I had follow me through the branches. * refactor: Better StartNetworkManager parameters This fix was inspired by Beck mentioning that the StartNetworkManager didn't have a comment that it could only start in Host mode. I added some additional parameters to allow one to start the NetworkManager in Host, Server, or Client mode. * Update com.unity.multiplayer.mlapi/Tests/Runtime/NetworkManagerHelper.cs nice find! Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * style: static Standards Renaming m_CurrentNetworkManagerMode to s_CurrentNetworkManagerMode * Update com.unity.multiplayer.mlapi/Tests/Runtime/NetworkManagerHelper.cs Ahhh yeah... nicely found! Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * style Fixing camelCase. * Update com.unity.multiplayer.mlapi/Tests/Runtime/NetworkManagerHelper.cs Yes, that I do! Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * style: wording Dropped a t in networkManagerComponent. Added the t back. * refactor: debug logs to debug log A slicker version of my logging done in one pass (thanks to Fatih for the suggestion)! * Update com.unity.multiplayer.mlapi/Tests/Runtime/RpcQueueTests.cs Another nice suggestion! Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * Update com.unity.multiplayer.mlapi/Tests/Runtime/RpcQueueTests.cs Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * Update com.unity.multiplayer.mlapi/Tests/Runtime/RpcQueueTests.cs Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * Refactor: minor adjustment to logging Fixed the scenario where it would log that "None" stopped. Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com>
This fixes an issue where the destroy method can get called twice on the client side after receiving a destroy object command.
Decided this isn't worth the optimization.
fix: destroy object spam
* fix: implement warning logs on non-owner invoking ServerRpc that requires ownership (#627) * add todo comments * fix: implement warning logs on non-owner invoking ServerRpc that requires ownership * fix: Correcting the profiler names for network vars to be appropriately named. Should address issue #605 (#632) * test: NetworkTickSystem test (#630) * test: NetworkTickSystem test * test: NetworkTickSystem test, removed unneeded code * fix: Fix object traversal assigning instanceIds to none scene objects (#629) * fix: Fix object traversal assigning instanceIds to none scene objects * comment added Co-authored-by: Matt Walsh <matt.walsh@unity3d.com> * fix: Correcting the profiler names for named messages vars to be appropriately named. Should address issue #604 (#634) * fix: prevent OnPerformanceTickData from sending data on null (#614) If something causes an exception it's possible that the profiler never allocates data. in these cases, there is no point in sending data outside of MLAPI * fix: use specified transport channel instead of hardcoded reliablerpc channel (#638) * docs: added release notes to changelog.md (#569) * Add release notes to changelog * docs: added release notes to changelog * Update com.unity.multiplayer.mlapi/CHANGELOG.md Co-authored-by: Luke Stampfli <43687322+LukeStampfli@users.noreply.github.com> * update per review for bitserializer and networkserializer * revised per feedback - API refactor * update remove bitserializer * renaming * Update com.unity.multiplayer.mlapi/CHANGELOG.md Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * Update com.unity.multiplayer.mlapi/CHANGELOG.md * Update com.unity.multiplayer.mlapi/CHANGELOG.md * added known issues and scene mgmt fix * revisions per review * profiler final - no more updates * format Co-authored-by: Luke Stampfli <43687322+LukeStampfli@users.noreply.github.com> Co-authored-by: Matt Walsh <69258106+mattwalsh-unity@users.noreply.github.com> Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * docs: Update repository/project docs (#636) - Mirror package readme.md in root readme.md - Add repo directory structure description - Remove contributing and code of conduct from package directory * docs: Add content for mlapi manual.md (#639) resolves #553 resolves MTT-534 * fix: Removed per-tick runtime allocations by reusing memory between ticks (#640) PerformanceDataManager reuses PerformanceTickData by resetting per-frame Replaces deferred linq query in PerformanceTickData loop. * fix: fixed network activity occurring outside the core update getting missed in the profiler (#641) Co-authored-by: Matt Walsh <69258106+mattwalsh-unity@users.noreply.github.com> * fix: Resolve an issue where 2019.4 would not properly run ILPP with a clean import (#645) * Add an dummy ILPP to force 2019.4 to proper compilation order * Turning on this test for 2019.4 * Hack -> Workaround rename Co-authored-by: Matt Walsh <matt.walsh@unity3d.com> Co-authored-by: Matt Walsh <69258106+mattwalsh-unity@users.noreply.github.com> * build: add Unity module dependencies explicitly (#648) Co-authored-by: kvassall-unity <68920108+kvassall-unity@users.noreply.github.com> Co-authored-by: Jeffrey Rainy <jeffreyrainy@gmail.com> Co-authored-by: Albin Corén <2108U9@gmail.com> Co-authored-by: Matt Walsh <matt.walsh@unity3d.com> Co-authored-by: Lori Krell <76010626+lkrell@users.noreply.github.com> Co-authored-by: Luke Stampfli <43687322+LukeStampfli@users.noreply.github.com> Co-authored-by: Matt Walsh <69258106+mattwalsh-unity@users.noreply.github.com> Co-authored-by: Jesse Olmer <jesseo@unity3d.com> Co-authored-by: becksebenius-unity <74328025+becksebenius-unity@users.noreply.github.com> Co-authored-by: Andrew Spiering <aspiering@gmail.com>
…rofiler functionality
…t MLAPI could use directly
…or RPC Queue validation purposes (#635) * fix: remove singleton references This removes the NetworkManager.Singleton dependencies from within the RpcQueueContainer and RpcQueueProcessor classes. This further strengthens the RPC Queue system as a whole, will allow for multiple instances if RpcQueueContainer, removes a limitation I set in NetworkWriter.ReadAndWrite, and provides unit testing capabilities required for new RPC Queue unit Tests. * test: rpc queue tests The new rpc queue tests without all of the extra files associated with them. * test: ClientRpcTesting Added some additional prefabs to make creating a new scene simpler. Added a ManualTests folder where manual tests can live. Added ClientRpcTesting scene that tests sending to one client, multiple clients, and all clients in many different combinations. * refactor: removed empty GameObject Noticed there was an empty GameObject in the testing scene, so I removed it. * refactor: condense, better comments, minor polish Condensed the initialization process. Adjusted the comments to better match the user story (testing and what is being tested). Adjusted-polished up some UI related items like the visual name or concept relating to a specific counter, etc. * style: standards Minor LF adjustment and permissions declaration for m_GlobalCounterOffset property * refactor: renamed test Just renamed the Rpc Test scene to better reflect that it tests client and server rpcs. * refactor: additional tests Added 4 new tests that send no parameters and multiple parameters both directions (server to client and vice versa). * Update testproject/Assets/ManualTests/ClientCounterBehaviour.cs Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * Update testproject/Assets/ManualTests/ClientCounterBehaviour.cs Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * Update testproject/Assets/ManualTests/ClientCounterBehaviour.cs Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * Update testproject/Assets/ManualTests/ClientCounterBehaviour.cs Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * Update testproject/Assets/ManualTests/ClientCounterBehaviour.cs Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * Update testproject/Assets/ManualTests/ClientCounterBehaviour.cs Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * Update testproject/Assets/ManualTests/ClientCounterBehaviour.cs Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * style: Mutli to Multi Changed all occurrences of Mutli to Multi * Revert "style: Mutli to Multi" This reverts commit 0ec8343. * style: Mutli to Multi Replaced all occurrences of Mutli to Multi * style: PascalCase for private Minor PascalCase adjustment for private property m_LocalClientCounter. Co-authored-by: Matt Walsh <69258106+mattwalsh-unity@users.noreply.github.com> Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com>
…ones_proflier_test refactor: Building out a test to get some surface coverage of the mlapi p…
* add .editorconfig * dotnet-format testproject.sln * fix style errors * complete: spacing and formatting rules * dotnet-format after merge
Break package tests out into separate build file from the project tests Create some "run all" wrapper jobs for package and project tests Update naming on the test jobs a bit Create a Nightly Develop trigger that will run all tests and run code coverage
…ique (#742) * test: all networkprefabs attached to the networkmanager have to be unique * do not call setdirty in playmode * uncheck dontdestroy flag on networkmanager instance in the scene
* fix: do not override GlobalObjectIdHash in Editor * squash
BREAKING CHANGE: Access CustomMessageManager with NetworkManager.Singleton.CustomMessageManager
This is the first pass changes required to implement MTT-640. The default player prefab is now a directly assigned value as opposed to a checkbox in the network prefab list. The default player prefab has to also be included in the NetworkPrefab list (this is so the default player prefab can be overridden too) NetworkPrefab entries can be overridden and directly assigned alternate prefabs for clients to spawn. The source prefab (what the server uses) can be a prefab reference or a prefab hash.
This update is the first pass of making this update as painless as possible to the user by "auto-handling" the v0.1.0 NetworkPrefab pattern as well as there is additional "user-bumper" code that assures the assigned default player prefab is always in the NetworkPrefab list.
Removing the auto insert within the editor and doing this at runtime. Added additional check to handle assigning the OverridingSourcePrefab if it is null and the Prefab is not.
This will prevent the scenario where a user might want to delete the default player prefab but also has it assigned within the NetworkPrefab list. This assures that a newly created network prefab list entry is blank and that there are not two entries within the list that have the same global object id hash.
just adding a few comments
Adjusted names of the new NetworkPrefab properties and added additional comments to better clarify some of the "trickery" happening that will help make this a "non-breaking" feature when it comes to existing v0.1.0 NetworkConfigs and the already selected default player prefab.
This will prevent any future client side soft synchronization issues or related issues where only one (or a few) NetworkObjects are misconfigured and the client fails to synchronize (find or instantiate). As opposed to completely breaking the rest of the pending NetworkObjects to be synchronized/instantiated, it will log an error and continue loading. This also has some additional comments and updates to comments for better clarity.
minor change in comments
Co-authored-by: Matt Walsh <69258106+mattwalsh-unity@users.noreply.github.com>
BREAKING CHANGE: Access CustomMessageManager with NetworkManager.Singleton.CustomMessageManager
This removes the CreatePlayerPrefab property from the NetworkConfig and from the NetworkManagerEditor. It is no longer needed as the NetworkConfig.PlayerPrefab property being something other than null tells us that the user wants to have MLAPI automatically spawn the players for them.
removed unused namespace references.
Added a tooltip for the new NetworkConfig.PlayerPrefab property
Added some spaces between the forward slashes and comment's text body
Migrating some useful elements from theScaleDemo repo into the test project for manual testing purposes. Added a samples folder with the first sample: Enalbe or Disable in-scene placed NetworkObject. Did some general clean up of the folders.
This fixes an issue that can occur with serialization and NetworkPrefabOverrideLinks. The policy is to ALWAYS clear this dictionary before building the links dictionary.
Adding check for NetworkManager before trying to access it.
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.
This PR includes additional acceptance tests for MTT-640 and PR-749.
This also includes additional assets exported from ScaleDemo that are used for manual testing.
This also includes one additional sample scene that demonstrates how to enable and disable components of an in-scene placed NetworkObject.
Still WIP