示例#1
0
        /// <summary>
        ///
        /// </summary>
        public static void Exit()
        {
            if (!s_IsInited)
            {
                return;
            }
            switch (Application.platform)
            {
            case RuntimePlatform.Android:
                break;

#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
            case RuntimePlatform.WindowsEditor:
            case RuntimePlatform.WindowsPlayer:
                HidStream.ExitLibrary();
                BluetoothAdapter.CloseDefaultAdapter();
                break;
#endif
            }
            s_IsInited = false;
        }
示例#2
0
        /// <summary>
        /// TODO : ????
        /// </summary>
        protected virtual void OnDestroy()
        {
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
            BluetoothAdapter.CloseDefaultAdapter();
#endif
        }