コード例 #1
0
    private void Start()
    {
        getAPiLevel();
        AmplitudeControl();
        DefaultAmplitude();
        PhoneAdeTakVibrator();
        showOrHideWarningPanel();

        if (Vibration.GetApiLevel() < 2)
        {
            Debug.Log("You run in a editor");
        }
    }
コード例 #2
0
    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);
        }
    }
コード例 #3
0
 private void getAPiLevel()
 {
     text1.text = "API LEVEL IS " + Vibration.GetApiLevel().ToString();
 }