Skip to content

fix: remove NetworkManager.Singleton dependencies - #625

Merged
NoelStephensUnity merged 4 commits into
developfrom
fix/rpcqueueremovesingleton
Mar 16, 2021
Merged

fix: remove NetworkManager.Singleton dependencies#625
NoelStephensUnity merged 4 commits into
developfrom
fix/rpcqueueremovesingleton

Conversation

@NoelStephensUnity

Copy link
Copy Markdown
Member

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.

Carried previous suggestions forward from reverted release/0.1.0 PR

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.
@NoelStephensUnity
NoelStephensUnity marked this pull request as draft March 15, 2021 22:15
@NoelStephensUnity
NoelStephensUnity marked this pull request as ready for review March 15, 2021 22:31
Comment thread com.unity.multiplayer.mlapi/Runtime/Messaging/RpcQueue/RpcQueueContainer.cs Outdated

@0xFA11 0xFA11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Looks like there were some remaining NumberOfRPCsSent vs RpcSent conversions.
@NoelStephensUnity
NoelStephensUnity merged commit e318357 into develop Mar 16, 2021
@NoelStephensUnity
NoelStephensUnity deleted the fix/rpcqueueremovesingleton branch March 16, 2021 21:10
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.

2 participants