Esempio n. 1
0
        private static void onUpdateValueCallback(IntPtr peripheral, IntPtr characteristic, IntPtr data, long length)
        {
            UnityCBCharacteristic c = new UnityCBCharacteristic(characteristic);
            UnityCBPeripheral     p = new UnityCBPeripheral(peripheral);

            byte[] result = new byte[length];
            Marshal.Copy(data, result, 0, (int)length);
            UnityCoreBluetooth.onUpdateValueHandler(p, c, result);
        }
Esempio n. 2
0
        private static void onConnectPeripheralCallback(IntPtr peripheral)
        {
            UnityCBPeripheral p = new UnityCBPeripheral(peripheral);

            UnityCoreBluetooth.onConnectPeripheralHandler(p);
        }
Esempio n. 3
0
 public void Connect(UnityCBPeripheral peripheral)
 {
     unityCoreBluetooth_connect(nativePtr, peripheral.nativePtr);
 }