Using the mousewheel without pressing it


I’m searching for a solution how to use the mousewheel “Input” without pressing it.
How does it work? The network does not to seem to have a solution…
(just want to make a scrolling thingy ;))

Please help me…

Input.GetAxis(“Mouse ScrollWheel”);
as described here:

If your trying to scroll on a UI element you should use ScrollRect




ScrollRect API:

ScrollRect Tutorial:

Get Axis API:

Get Axis Tutorial:

You should use something like this:

function Update(){
     height += Input.GetAxis("Mouse ScrollWheel") * Time.deltaTime * 10;

Then add to each UI element that height value (75 + height, 420 + height etc.)

You might also want to check if height is not less than 0, and if it is, set it back to 0