After upgrading one of my projects to Unity 5.5.0f3, I realized there is a problem with Network Manager. If you have a scene that contains a Network Manager with the Dont Destroy On Load option set to true (which is the default) and generate a build, you will receive the following warning:
NetworkManager detected a script reload in the editor. This has caused the network to be shut down.
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()
and the following error:
InvalidOperationException: The following game object is invoking the DontDestroyOnLoad method: NetworkManager. Notice that DontDestroyOnLoad can only be used in play mode and, as such, cannot be part of an editor script.
UnityEngine.Networking.NetworkManager.InitializeSingleton () (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkManager.cs:196)
UnityEngine.Networking.NetworkManager.UpdateScene () (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkManager.cs:729)
UnityEngine.Networking.NetworkIdentity.UNetStaticUpdate () (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:1074)
This happens after building and, sometimes, after selecting the Network Manager object in the project hierarchy. The resulting build seems to work just fine, though.
If you set the Dont Destroy On Load option to false, you only receive the warning.
I isolated this issue in a test project and submitted a bug report (#857876), as I understand this should not happen (it certainly did not happen in previous versions of the engine).