public OnBleDidInitialize ( string message ) : void | ||
message | string | |
Результат | void |
// Now make methods that you can provide the iOS functionality public static void InitBLEFramework() { // We check for UNITY_IPHONE again so we don't try this if it isn't iOS platform. #if UNITY_IPHONE // Now we check that it's actually an iOS device/simulator, not the Unity Player. You only get plugins on the actual device or iOS Simulator. if (Application.platform == RuntimePlatform.IPhonePlayer) { _InitBLEFramework(); } #elif UNITY_ANDROID if (Application.platform == RuntimePlatform.Android) { System.Action <string> callback = ((string message) => { BLEControllerEventHandler.OnBleDidInitialize(message); }); PluginInstance.Call("_InitBLEFramework", new object[] { new UnityCallback(callback) }); } #endif }
//Instance methods used by iOS Unity Send Message void OnBleDidInitializeMessage(string message) { BLEControllerEventHandler.OnBleDidInitialize(message); }