{"repo":"bentalebahmed/BlueUnity","free":true,"listed":false,"github":"https://github.com/bentalebahmed/BlueUnity","clone":"git clone https://github.com/bentalebahmed/BlueUnity.git","description":"Plugin to enable Bluetooth connectivity for Unity3D Android","language":"Kotlin","stars":152,"topics":["android","unity3d","arduino","bluetooth-arduino","java","c-sharp","unity","bluetooth"],"license":"MIT","category":"game-templates","readme_excerpt":"BlueUnity (Kotlin Version) BlueUnity is a Unity plugin that provides Android Bluetooth Classic connectivity. This version is a Kotlin-based implementation that enables device scanning, pairing, server/client connections, and byte-stream communication directly from Unity. --- Permissions & Bluetooth Control - Automatic Bluetooth permission handling (No location permission needed) - Check Bluetooth enabled state and request enabling - Set device discoverability (server mode) - Rename the device during discoverable mode Device Management - Retrieve paired devices - Search for nearby devices - Connect/disconnect using MAC address - Device-to-device (mobile, tablet, headset, etc.) communication (one server, one client) - Device-to-module (ESP32, HC-05/06, BM78, etc.) communication (Device as client and the module always as a server) Communication - Read and write byte streams - Callback system using JavaProxy (no Unity SendMessage ) Available Callbacks - onDiscoveryStarted() - onDiscoveryDeviceFound(name: String, address: String) - onDiscoveryFinished() - onConnecting(address: String) - onConnected(address: String) - onDisconnected(address: String) - onDataReceived(data: ByteArray) - onDataNotSent(data: ByteArray) - onError(error: String) Kotlin ByteArray → Unity byte[] Conversion Kotlin uses signed bytes ( Byte , -128 to 127) , while Unity uses unsigned bytes ( byte , 0 to 255) . - All data received from Android arrives as signed ByteArray - A conversion is automatically handled ","default_branch":null,"files":null,"tree":[],"storefront":"/r/bentalebahmed","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bentalebahmed/BlueUnity/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}