- Home /
 
 
               Question by 
               ChompIV · Jun 13, 2017 at 06:25 PM · 
                c#playerprefsfloatmouselooksensitivity  
              
 
              How to use PlayerPrefs to save to floats (Sensitivity Help)
Here is what I'm having trouble with, I know it doesnt work for some reason but im not sure why because I am new. Thanks.
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 
 public class sensitivitySliderScript : MonoBehaviour {
     public float xFloat;
 
 
      
     void Update () {
 
        MouseLook.XSensitivity = xFloat;
 
         PlayerPrefs.SetFloat("currentX", xFloat);
 
 
         xFloat = PlayerPrefs.GetFloat("currentX", 0);
 
 
 
     }
 }
 
              
               Comment
              
 
               
              Your answer
 
             Follow this Question
Related Questions
How do I take a public float from a different script and access it 0 Answers
Get a float from a different GameObject? (MouseLook) 1 Answer
Unity 5 access First Person Controller Mouse Look Sensitivity via script 3 Answers
sensitivity slider/ drop down help 0 Answers
Multiple Cars not working 1 Answer