Unity-Technologies / multiplayer-community-contributions

Community contributions to Unity Multiplayer Networking products and services.
MIT License
421 stars 161 forks source link

Allow reconnection after shuftdown #166

Closed qkdreyer closed 2 years ago

qkdreyer commented 2 years ago

Calling NetworkManager.Singleton.Shutdown() triggers the following stacktrace :

image

Which will call again https://github.com/Unity-Technologies/multiplayer-community-contributions/blob/279640ad3e3d0c73e2cdcab6b640ec150d7846c8/Transports/com.community.netcode.transport.photon-realtime/Runtime/PhotonRealtimeTransport.cs#L482

Since the NetworkManager is already shutdown, a reconnection will trigger the ShutdownInternal, and actually prevents it