slider doesn't change value

Hello, i have 3D game where i added slider which can change sensitivity of camera but when i move slider, camera doesn’t change its sensitivity and that camera is in character which is prefab which is instantiated when game scene start

i tried this but it didnt work

public float sensitivityOfCam;
//declaration

RotationX += Input.GetAxis("Mouse X") * sensitivityOfCam ;  // this line is in function which manage mouse input


public void changeSensitivity(float sensitivity)  //function which is assigned to slider
    {
        sensitivityOfCam = sensitivity;    
    }

6647566--759136--slider.png

Where is line 4 called? And after it’s called, what causes RotationX to affect the actual rotation?

Well, the most likely issue I notice is that in your screenshot, instead of using a “dynamic float” callback, you are passing a constant value of “1” regardless of the slider’s value.

But there could be other issues; that’s not a large enough piece of your code to tell.

change sensitivity is called by this slider, what u see is the same function but name is in my native language

how can i change it from that constant value to dynamic which will be affected by slider ?
because i was watching some youtube videos about that and they dont even had that value line

if a callback has an argument the sender can specify it, the dynamic values are on top, there’s a title that says it in the selection menu.

To be a little more specific, in the dropdown list where you select which function you want to call when the value changes, functions that accept a float parameter will be listed twice–once near the top of the list under a heading that says “dynamic float”, and then again in the main list with the other eligible functions. To send the slider’s value as the parameter, you need to select the version in the “dynamic float” section.