Steamworks.NET
Steamworks.NET copied to clipboard
Shutdown never releases unity editor process
internal static void Shutdown() {
lock (m_sync) {
--m_initCount;
if (m_initCount == 0) {
UnregisterAll();
Marshal.FreeHGlobal(m_pCallbackMsg);
m_pCallbackMsg = IntPtr.Zero;
}
}
}
i added breakpoint here and confirmed that m_initCount == 0 when play mode exits but steam never releases the editor and its always in "running" state
#if UNITY_EDITOR
void OnEnable()
{
EditorApplication.playModeStateChanged += HandlePlayModeState;
}
void OnDisable()
{
EditorApplication.playModeStateChanged -= HandlePlayModeState;
}
void HandlePlayModeState(PlayModeStateChange state)
{
if (state == PlayModeStateChange.ExitingPlayMode && _initialized)
{
Debug.Log("Shutting down SteamAPI...");
SteamAPI.Shutdown();
_initialized = false;
}
}
#endif
shutdown logic on my side (similar to example manager)
this is troublesome for our team, any tips would be much appreciated, did search issues but no joy
In fact, steam only detects whether the whole editor process is exited. I think this is related to your problem that your team don't restart editor every time when debug completed.