Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Web Bluetooth with WebGl?

Discussion in 'Web' started by Mindfield83, Nov 3, 2020.

  1. Mindfield83

    Mindfield83

    Joined:
    Sep 8, 2020
    Posts:
    2
    Hello,

    I am trying to use web bluetooth (https://webbluetoothcg.github.io/web-bluetooth/) with a Unity Webgl build. We have made a bluetooth low energy device for measuring muscle (EMG) and brainwave (EEG) activity and want to use it in a Unity game, hosted in a browser as Webgl build.

    So far, there is this bluetooth asset, but I don't think it supports web bluetooth under Webgl:

    https://assetstore.unity.com/packages/tools/network/bluetooth-le-for-ios-tvos-and-android-26661

    Can anybody help us with that?

    Have a nice day!

    Best Regards
    Niko Rockensüß
     
  2. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    444
    naber78 and jukka_j like this.
  3. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    953
    The WebBluetooth API is somewhat out of scope from Unity APIs at the moment, but like @KamilDA mentions, nothing is preventing you from using it directly from JS, and then interop with the Unity project to do the needed communication back and forth with the engine.
     
  4. Mindfield83

    Mindfield83

    Joined:
    Sep 8, 2020
    Posts:
    2
    Thank you so much! We will try that approach.