Describe the bug
NetworkManager will automatically add the current scene to its "RegisteredScenes" list. It does this by directly adding the scene to the RegisteredScenes list (NetworkManager.cs:214 on #a0e87b3b79) but it does not call EditorUtility.SetDirty on the object. This means that if there are no other changes to the NetworkManager, the object/scene is not flagged for reserialization and may not be saved to disk.
To Reproduce
Steps to reproduce the behavior:
- Create a saved scene on disk
- Add a network manager to the scene
- Note that the network manager will automatically add the registered scene, but because you just made a change it will be added correctly
- Rename or Duplicate your scene
- Open the scene but make no further changes
- Select the NetworkManager (may not be necessary)
- Observe that the NetworkManager automatically added your current scene to its settings, but no other changes were made to the scene
- Close Unity
- Notice that there is no "Unsaved changes" prompt
Expected behavior
When automatically updating serialized data in the network manager, the editor needs to be informed so that the data is saved correctly
Environment (please complete the following information):
- OS: Win10
- Unity Version: 2020.2.7f1
- MLAPI Version: 0.1.0
- MLAPI Commit: a0e87b3
Additional context
I mainly witnessed this behavior when running MultiPie. Because the configuration change is not saved, the remote client and server disagree on the network manager configuration. Users would likely observe the same behavior when testing their game with sym links.
Describe the bug
NetworkManager will automatically add the current scene to its "RegisteredScenes" list. It does this by directly adding the scene to the RegisteredScenes list (
NetworkManager.cs:214on #a0e87b3b79) but it does not call EditorUtility.SetDirty on the object. This means that if there are no other changes to the NetworkManager, the object/scene is not flagged for reserialization and may not be saved to disk.To Reproduce
Steps to reproduce the behavior:
Expected behavior
When automatically updating serialized data in the network manager, the editor needs to be informed so that the data is saved correctly
Environment (please complete the following information):
Additional context
I mainly witnessed this behavior when running MultiPie. Because the configuration change is not saved, the remote client and server disagree on the network manager configuration. Users would likely observe the same behavior when testing their game with sym links.