Closed mattnewport closed 4 years ago
When Unity's experimental Configurable Enter Play Mode (https://docs.unity3d.com/2019.3/Documentation/Manual/ConfigurableEnterPlayMode.html) is enabled static fields are not reinitialized to null.
This change makes Forge compatible with Configurable Enter Play Mode by clearing the static singleton _instance field when the MainThreadManager is destroyed on exiting play mode.
Replaces https://github.com/BeardedManStudios/ForgeNetworkingRemastered/pull/365 which was incorrectly targeted at master branch.
When Unity's experimental Configurable Enter Play Mode (https://docs.unity3d.com/2019.3/Documentation/Manual/ConfigurableEnterPlayMode.html) is enabled static fields are not reinitialized to null.
This change makes Forge compatible with Configurable Enter Play Mode by clearing the static singleton _instance field when the MainThreadManager is destroyed on exiting play mode.
Replaces https://github.com/BeardedManStudios/ForgeNetworkingRemastered/pull/365 which was incorrectly targeted at master branch.