/// <summary> /// Start pairing procedure where the myo must tap the device in order to connect. /// </summary> public static void AttachToAdjacent() { #if UNITY_IPHONE && !UNITY_EDITOR isAttaching = true; MyoBinding._attachToAdjacent(); #endif }
/// <summary> /// Vibrates the Myo device for the specified length, Short, Medium, or Long. /// </summary> /// <returns><c>true</c>, if vibrated, <c>false</c> otherwise.</returns> /// <param name="length">Length.</param> public static bool VibrateForLength(MyoVibrateLength length, int index = 0) { #if UNITY_IPHONE && !UNITY_EDITOR return(MyoBinding._vibrateForLength(index, (int)length)); #else return(false); #endif }
/// <summary> /// Presents Pairing UI that allows user to scan for Myo devices, and pair/unpair Myos at will. /// </summary> /// <returns><c>true</c>, if pairing ui was presented, <c>false</c> if pairing ui failed to be presented, usually because Unity view isn't fully initialized yet.</returns> public static bool PresentPairing() { #if UNITY_IPHONE && !UNITY_EDITOR isAttaching = true; return(MyoBinding._presentPairing()); #endif return(false); }
/// <summary> /// Initializes and enables Myo plugin /// </summary> public static void Initialize() { Debug.Log("Initializing Myo"); #if UNITY_IPHONE && !UNITY_EDITOR MyoBinding._initialize(); #endif instance.isEnabled = true; myoRotations = new List <Quaternion>(); }