BluetoothWindows.cs 604 B

1234567891011121314151617181920
  1. using System;
  2. using UnityEngine;
  3. namespace SmartBowSDK
  4. {
  5. public class BluetoothWindows
  6. {
  7. public Func<bool> Connect;
  8. public Func<bool> Disconnect;
  9. public Func<string, bool> Write;
  10. public Func<byte[], bool> WriteByte;
  11. public Action OnConnected;
  12. public Action OnConnectionFailed;
  13. public Action<string,byte[]> OnCharacteristicChanged;
  14. public static bool IsWindows()
  15. {
  16. return Application.platform == RuntimePlatform.WindowsPlayer || Application.platform == RuntimePlatform.WindowsEditor;
  17. }
  18. }
  19. }