private static void HandlePlayMode(PlayModeStateChange state)
 {
     if (state == PlayModeStateChange.ExitingPlayMode && Instance != null)
     {
         Instance.Refresh();
     }
 }
 private static void HandlePlayMode(PlayModeStateChange state)
 {
     if (state == PlayModeStateChange.ExitingEditMode && Instance != null && Instance.API != null)
     {
         Instance.API.Disconnect();
     }
     if (state == PlayModeStateChange.ExitingPlayMode && Instance != null)
     {
         Instance.Refresh();
     }
 }
        private static void HandlePlayMode(PlayModeStateChange state)
        {
            if (Instance == null)
            {
                return;
            }

            if (state == PlayModeStateChange.ExitingPlayMode)
            {
                Instance.Refresh();
            }
            else if (state == PlayModeStateChange.ExitingEditMode)
            {
                Instance.API.Disconnect();
            }
        }