using UnityEngine; using UnityEngine.UI; public class MouseSensitivityController : MonoBehaviour { public Slider sensitivitySlider; private float mouseSensitivity = 1f; void Start() { sensitivitySlider.value = mouseSensitivity; sensitivitySlider.onValueChanged.AddListener(OnSensitivityChanged); } void Update() { float mouseX = Input.GetAxis("Mouse X") * mouseSensitivity; float mouseY = Input.GetAxis("Mouse Y") * mouseSensitivity; } public void OnSensitivityChanged(float value) { mouseSensitivity = value; Debug.Log("Czułość myszy zmieniona na: " + mouseSensitivity); } }