void Awake() { if (dontDestroyOnLoad) { if (_manager == null) { DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); return; } } var uninstalledMessage = "bHaptics Player is not installed. Plugin is now disabled. Please download here." + "\nhttp://bhaptics.com/app.html#download"; _manager = this; if (!BhapticsUtils.IsPlayerInstalled()) { Debug.LogError(uninstalledMessage); return; } if (!BhapticsUtils.IsPlayerRunning()) { Debug.Log("bHaptics Player is not running, try launching bHaptics Player."); BhapticsUtils.LaunchPlayer(launchPlayerIfNotRunning); } }
void Awake() { if (dontDestroyOnLoad) { if (Instance == null) { DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); return; } } var uninstalledMessage = "bHaptics Player is not installed. Plugin is now disabled. Please download here." + "\nhttp://bhaptics.com/app.html#download"; Instance = this; if (!BhapticsUtils.IsPlayerInstalled()) { Debug.LogError(uninstalledMessage); return; } if (!BhapticsUtils.IsPlayerRunning()) { Debug.Log("bHaptics Player is not running, try launching bHaptics Player."); BhapticsUtils.LaunchPlayer(launchPlayerIfNotRunning); } if (Application.platform == RuntimePlatform.Android && BhapticsAndroidManager.Instance == null) { var bhapticsAndroidManager = Instantiate(bHapticsAndroidManagerPrefab, Vector3.zero, Quaternion.identity); bhapticsAndroidManager.name = "[bHapticsAndroidManager]"; bhapticsAndroidManager.transform.parent = transform; } }
void Awake() { var uninstalledMessage = "bHaptics Player is not installed. Plugin is now disabled. Please download here." + "\nhttp://bhaptics.com/app.html#download"; _manager = this; if (!BhapticsUtils.IsPlayerInstalled()) { Debug.LogError(uninstalledMessage); return; } if (!BhapticsUtils.IsPlayerRunning()) { Debug.Log("bHaptics Player is not running, try launching bHaptics Player."); BhapticsUtils.LaunchPlayer(launchPlayerIfNotRunning); } if (Application.platform == RuntimePlatform.Android) { Invoke("AndroidStopScan", 3f); } }