Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. public Slider Brightness;
  2. public float bri,briv; // only briv value I saving it.
  3.  
  4. // Use this for initialization
  5. void Start () {
  6. PlayerPrefs.GetFloat("briv");
  7. Brightness.value = briv;
  8. }
  9.  
  10. void Update() {
  11. briv = bri;
  12. bri = Brightness.value;
  13.  
  14. if (Input.GetKeyDown(KeyCode.S)) {
  15. PlayerPrefs.SetFloat("briv",briv);
  16. Debug.Log ("save");
  17. }
  18.  
  19. } // end update
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement