So if If I leave a scene with a network manager and it gets destroyed the next time I try to start one up I get:
NullReferenceException: Before using the library you should call Init() and do not forget to call Shutdown() afterwards
UnityEditor.NetworkDetailStats+NetworkOperationDetails.NewProfilerTick (Int32 tickId) (at C:/buildslave/unity/build/Editor/Mono/Profiler/NetworkDetailStats.cs:118)
UnityEditor.NetworkDetailStats.NewProfilerTick (Single newTime) (at C:/buildslave/unity/build/Editor/Mono/Profiler/NetworkDetailStats.cs:209)
UnityEngine.Networking.NetworkIdentity.UNetStaticUpdate () (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:1095)
Are you using LLAPI or HLAPI?
Seems by the messages like you are using HLAPI.
I guess just before you destroy the NetworkManager. Do NetworkManager.Shutdown();
I am using HLAPI but I do still get a lot of LLAPI errors. I am trying to make it shut down properly but would still like a way to prevent the app from being permanently broken if a scene is exited incorrectly.
After looking at the HLAPI code StartClient calls NetworkTransport.Init. Does the LLAPI have a get state method so I can see if it needs to be shutdown before it starts?
I will see if calling it in OnDestroy works but for not destroying it on my current project it is in a stage where its a bit late to totally change how scene transitions work.
You don’t have to change how transitions work. There is a option on the networkmanager called “DontDestroyOnLoad”. Tick it and the NM will remain across scenes.