---
tags:
    - "Cursor"
    - "Wheel"
    - "Zoom"
    - "Vertical"
---

# Mouse Scroll Vertical

[Input](index.md) / **Mouse Scroll Vertical**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

Returns the vertical scrolling value of the Mouse

## Code

```cs
using System;
using UnityEngine.InputSystem;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]

    [Title("Mouse Scroll Vertical")]
    [Category("Input/Mouse Scroll Vertical")]

    [Description("Returns the vertical scrolling value of the Mouse")]
    [Image(typeof(IconScroll), ColorTheme.Type.Blue, typeof(BadgeY))]

    [Keywords("Cursor", "Wheel", "Zoom", "Vertical")]

    [Serializable]
    public class TypeNumberInputMouseScrollVertical : TypeNumber
    {
        public override double Get(Args args)
        {
            Mouse mouse = Mouse.current;
            return mouse != null ? mouse.scroll.ReadValue().y : 0d;
        }

        public override string ToString()
        {
            return "Mouse Scroll Vertical";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

```

