Esempio n. 1
0
    public void Visible()
    {
        bool value = Togle.GetComponent <Toggle>().isOn;

        if (value)
        {
            PlayerPrefs.SetInt("Visible", 1);
        }
        else
        {
            PlayerPrefs.SetInt("Visible", 0);
        }
    }
Esempio n. 2
0
 public void SetStandartValueSesAndDropBox()
 {
     if (PlayerPrefs.HasKey("Joystick"))
     {
         dropBox.GetComponent <Dropdown>().value = PlayerPrefs.GetInt("Joystick");
     }
     if (PlayerPrefs.HasKey("Sensetive"))
     {
         Sensetive.GetComponent <Slider>().value = PlayerPrefs.GetFloat("Sensetive");
     }
     if (PlayerPrefs.HasKey("Visible"))
     {
         Togle.GetComponent <Toggle>().isOn = (PlayerPrefs.GetInt("Visible") == 1);
     }
 }