Skip to content

fix: Shutting down client or host/server and not being able to start the client or host/server within same game instance#496

Merged
NoelStephensUnity merged 29 commits intodevelopfrom
fix/mtt512
Feb 25, 2021
Merged

fix: Shutting down client or host/server and not being able to start the client or host/server within same game instance#496
NoelStephensUnity merged 29 commits intodevelopfrom
fix/mtt512

Conversation

@NoelStephensUnity
Copy link
Copy Markdown
Member

@NoelStephensUnity NoelStephensUnity commented Feb 24, 2021

This fixes some initialization issues that occur when shutting down a client or server/host and not being able to re-establish a new networked gaming session from the same game build instance running or same editor PlayMode instance.
This moves the RPCQueueContainer instantiation and Network Update Loop registration into the Init method of the NetworkingManager and the deregistration from the Network Update Loop and destruction of the RpcQueueContainer into the NetworkingManager's shutdown method.

This PR fixes some of the issues for MTT-512

0xFA11 and others added 27 commits February 5, 2021 04:20
This fixes two issues:
It prevents the postprocessing method ProcessScene from being run during scene transitions while in PlayMode within the editor.

This fixes the issue where the transport is no longer being polled for events upon shutting down the server,host, or client.
This prevents this post processing code from being executed when in PlayMode (editor and stand alone build)
This ended up not being needed in the end.
Reverting back to the original file.
Removing the commented out OnDisable function (the containing code was moved into the Shutdown method) and removed the Awake method (the containing code was moved into the Init method).
This hadn't fully registered the merge.
Copy link
Copy Markdown
Contributor

@0xFA11 0xFA11 left a comment

Choose a reason for hiding this comment

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

LGTM!

@NoelStephensUnity NoelStephensUnity self-assigned this Feb 24, 2021
@NoelStephensUnity NoelStephensUnity added the type:bug Bug Report label Feb 24, 2021
Comment thread com.unity.multiplayer.mlapi/Runtime/Core/NetworkingManager.cs
Copy link
Copy Markdown
Contributor

@mattwalsh-unity mattwalsh-unity left a comment

Choose a reason for hiding this comment

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

LGTM, except for the comment addition I put in code. If you can stick in that comment SHIP IT

Added some comments regarding where the RpcQueueContainer should be instantiated and shutdown.
Made the RpcQueueContainer internal, which also required me to make the QueueHistoryFrame internal and adjust some of the methods to match the same accessibility level.
Copy link
Copy Markdown
Contributor

@mattwalsh-unity mattwalsh-unity left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@wackoisgod wackoisgod left a comment

Choose a reason for hiding this comment

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

LGTM

@NoelStephensUnity NoelStephensUnity merged commit 6bc2289 into develop Feb 25, 2021
@0xFA11 0xFA11 deleted the fix/mtt512 branch March 5, 2021 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Bug Report

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants