Exemplo 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);
        }
Exemplo n.º 2
0
        private static void onConnectPeripheralCallback(IntPtr peripheral)
        {
            UnityCBPeripheral p = new UnityCBPeripheral(peripheral);

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