public void onClickVibrationToggle() { if (VibrationToggle.isOn) { diceScript.vibrationAllowed = true; //for prefab diceControllerScript.setVibration(1); //for available objs } else if (!VibrationToggle.isOn) { diceScript.vibrationAllowed = false; //for prefab diceControllerScript.setVibration(0); //for available objs } }