Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Slider Brightness;
- public float bri,briv; // only briv value I saving it.
- // Use this for initialization
- void Start () {
- PlayerPrefs.GetFloat("briv");
- Brightness.value = briv;
- }
- void Update() {
- briv = bri;
- bri = Brightness.value;
- if (Input.GetKeyDown(KeyCode.S)) {
- PlayerPrefs.SetFloat("briv",briv);
- Debug.Log ("save");
- }
- } // end update
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement