morikatron/toio-sdk-for-unity

WebGL Bluetooth plugin throws erros after loading scene. WebGLでシーン切り替え時にBLEが動作しなくなる

MrkKSen opened this issue · 1 comments

WebBluetoothScript.cs makes a gameobject and attachs itself to the gameobject.
Errors occur after loading scene, because the gameobject is deleted.

instance = (WebBluetoothScript)gameObject.AddComponent(typeof(WebBluetoothScript));

A quick solution is to find the gameobject named ~WebBluetoothScript, and call DontDestroyOnLoad.