简单的iOS蓝牙数据传输使用Unity

有没有简单(甚至不是那么简单)的方式来传输less量的数据(一些小string和偶尔的数字)之间使用Unity的iOS设备? 我知道资产商店中有一些资产,但是这些资产是50美元以上,而且过于矫枉过正。 还是有一个很好的教程,我可以遵循?

那些是向上或$ 50

不,他们不是。 这是一个AndroidiOS的蓝牙插件10美元。

规则是这样的:

如果你是一个人,就用这个。 你会节省自己的时间。 如果你正在为一家公司工作,你应该制作自己的插件。

有没有一个很好的教程,我可以遵循?

如果您决定制作自己的蓝牙插件,则必须先学习Java。 制作一个简单的Android Java蓝牙程序,并在Android设备上进行testing。 如果它可以工作,那么你可以通过将代码分成bluetoothInit()bluetoothConnect()bluetoothSend()bluetoothReceive()bluetoothDisconnect()bluetoothClose()等函数将其转换为插件。 然后将其编译成插件( jaraar )文件。 您现在可以从Unity C#中调用这些函数。

了解Android蓝牙API 。

有关如何从Unity中的C#调用Java函数的链接 我build议你按照第一个链接。

http://www.what-c​​ould-possibly-go-wrong.com/creating-a-native-android-plugin-for-unity3d/

http://www.thegamecontriver.com/2015/04/android-plugin-unity-android-studio.html

https://www.thepolyglotdeveloper.com/2014/06/creating-an-android-java-plugin-for-unity3d/

编辑:

对于iOS ,您需要学习Objective-C。 学习iOS蓝牙API,然后制作一个插件。

https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/AboutCoreBluetooth/Introduction.html

http://code.tutsplus.com/tutorials/ios-7-sdk-core-bluetooth-practical-lesson–mobile-20741