DarkRift icon indicating copy to clipboard operation
DarkRift copied to clipboard

UnityServer does not close in editor

Open LukeStampfli opened this issue 5 years ago • 0 comments

To fix it, it should be enough to add:


#if UNITY_EDITOR
            EditorApplication.playModeStateChanged += (state) =>
            {
                if (state == PlayModeStateChange.ExitingPlayMode)
                {
                    Close();
                }
            };
#endif

In the OnEnable of the UnityServer. Make sure to also put the using UnityEditor in #if UNITY_Editor

LukeStampfli avatar Apr 07 '19 15:04 LukeStampfli