-
Notifications
You must be signed in to change notification settings - Fork 450
refactor!: NetworkSceneManager is no longer static #738
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
Conversation
BREAKING CHANGE: Access CustomMessageManager with NetworkManager.Singleton.CustomMessageManager
BREAKING CHANGE: Access NetworkSceneManager with NetworkManager.Singleton.SceneManager
…n-removal-scene-manager
@@ -304,11 +308,6 @@ private void Init(bool server) | |||
MessageHandler = new InternalMessageHandler(this); | |||
} | |||
|
|||
NetworkSceneManager.RegisteredSceneNames.Clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume we no longer need this because, even if we call Init() multiple times (e.g. call StartServer again after stopping) we are creating a new NetworkSceneManager, and the old one will be out of scope and be freed
Still, is there value in, if there already is a NetworkSceneManager, that we call perhaps a cleanup function on it that would do things like the code that was removed? And then ditto for the others here (CustomMessagingManager, BufferManager, etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way we do it currently fully cleans it up though. (Lists etc are actually thrown out instead of their Count being set to 0 and their underlying array still being present).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly want your thoughts on the need for still doing the cleanup I pointed out
BREAKING CHANGE: Access NetworkSceneManager with NetworkManager.Singleton.SceneManager