refactor: remove NetworkManager.Singleton dependencies, add additional instance tracking and notification when LogLevel.Developer - #562
Merged
Conversation
This refactoring includes additional checks to assure the RpcQueueContainer does not allow itself to be updated via the Network Update Loop system if there is no NetworkManager instantiated or if there is a problem with its initialization. Refactored the constructor and made the class disposable.
NoelStephensUnity
requested review from
0xFA11,
LukeStampfli and
mattwalsh-unity
March 9, 2021 14:21
Placing the increment above the log.
This reverts commit 3890232.
Moving the instance count above the logging of the instance count
0xFA11
reviewed
Mar 9, 2021
0xFA11
reviewed
Mar 9, 2021
Had a typo that said it was initializing as opposed to shutting down.
This refactor passes the RpcQueueContainer into the RpcQueueProcessor in order to start remove the RpcQueueContainer's dependencies on the NetworkManager.Singleton. This refactor removes RpcQueueContainer 's dependencies upon the NetworkManager.Singleton by passing the instance of the NetworkManager that constructed it. This should remove all dependencies from NetworkManager.Singleton from the entire Rpc Queue System!
This commit further improves the previous dependencies upon NetworkManager. This also expands unit testing capabilities that now can include RpcQueueProcessor. ( just detecting if we are listening or testing )
0xFA11
reviewed
Mar 9, 2021
0xFA11
reviewed
Mar 9, 2021
0xFA11
reviewed
Mar 9, 2021
0xFA11
reviewed
Mar 9, 2021
0xFA11
reviewed
Mar 9, 2021
…eContainer.cs Good addition, this will assure that anyone that changes the name of the class will see the name mismatch and update the log, Co-authored-by: M. Fatih MAR <[email protected]>
0xFA11
reviewed
Mar 9, 2021
0xFA11
reviewed
Mar 9, 2021
0xFA11
reviewed
Mar 9, 2021
…eContainer.cs Same catch.. I like that approach! Co-authored-by: M. Fatih MAR <[email protected]>
0xFA11
reviewed
Mar 9, 2021
0xFA11
reviewed
Mar 9, 2021
Updated some minor standards related issues and wrapped all of the debug logging related code in #if UNITY_EDITOR || DEVELOPMENT_BUILD
…hnologies/com.unity.multiplayer.mlapi into fix/rpcstartupshutdown
This assures that all log related messages utilize the appropriate class names. This removes some legacy language from the log related messages.
0xFA11
reviewed
Mar 9, 2021
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
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 refactor passes the RpcQueueContainer into the RpcQueueProcessor in order to completely remove the RpcQueueContainer's dependencies on the NetworkManager.Singleton.
This refactor removes RpcQueueContainer 's dependencies upon the NetworkManager.Singleton by passing the instance of the NetworkManager that constructed it via the constructor.
This should remove all dependencies from NetworkManager.Singleton from the entire Rpc Queue System!
Refactored the constructor and made the class disposable.
Simplified-Improve the constructor process.
If you set the NetworkLog.CurrentLevel to Developer it will notify you about: