I’m trying to implement a GUI slider for mouseSensitivity into my PauseMenu. It shows, but I can’t change it. I didn’t find a solution here or in Google and I searched a lot. Any help will be appreciated.
static var mouseSensitivityX : float = 4.0;
static var mouseSensitivityY : float = 1.6;
function MouseSensitivity()
{
GUILayout.Label("In Development");
mouse = gameObject.Find("Main Camera").GetComponent("MouseLook");
GUILayout.Label ("Mouse Sensitivity X: "+mouse.sensitivityX.ToString("f1"));
sensitivityX = GUILayout.HorizontalSlider(mouse.sensitivityX, 1.0, 20.0);
GUILayout.Label ("Mouse Sensitivity Y: "+mouse.sensitivityY.ToString("f1"));
sensitivityY = GUILayout.HorizontalSlider(mouse.sensitivityY, 0.5, 10.0);
}