refactor!: NetworkSceneManager is no longer static#738
Conversation
BREAKING CHANGE: Access CustomMessageManager with NetworkManager.Singleton.CustomMessageManager
BREAKING CHANGE: Access NetworkSceneManager with NetworkManager.Singleton.SceneManager
…n-removal-scene-manager
| MessageHandler = new InternalMessageHandler(this); | ||
| } | ||
|
|
||
| NetworkSceneManager.RegisteredSceneNames.Clear(); |
There was a problem hiding this comment.
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.
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).
mattwalsh-unity
left a comment
There was a problem hiding this comment.
Mainly want your thoughts on the need for still doing the cleanup I pointed out
BREAKING CHANGE: Access NetworkSceneManager with NetworkManager.Singleton.SceneManager