public static Bluetooth GetInstance() { if (instance == null) { instance = new Bluetooth(); try { instance.PluginStart(); instance.Discoverable(); connectedToAndroid = true; } catch (Exception e) { Debug.LogWarning("WARNING: Android environment not found! If it's supposed to (i.e. not testing/debugging), something terrible happened!"); Debug.LogWarning(e); connectedToAndroid = false; } } return(instance); }