private void Start() { getAPiLevel(); AmplitudeControl(); DefaultAmplitude(); PhoneAdeTakVibrator(); showOrHideWarningPanel(); if (Vibration.GetApiLevel() < 2) { Debug.Log("You run in a editor"); } }
private void showOrHideWarningPanel() { int currentApi = Vibration.GetApiLevel(); int minApiRequired = 29; bool supportAmplitude = Vibration.HasAmplitudeControl(); if (currentApi < minApiRequired) { WarningPanel.SetActive(true); } if (!supportAmplitude) { warningAmpPanel.SetActive(true); } }
private void getAPiLevel() { text1.text = "API LEVEL IS " + Vibration.GetApiLevel().ToString(); }