Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Is there a way to add mouse scrolling to a PopupField, or something that does the same but scrolls?

Discussion in 'Scripting' started by TheRealRan, Nov 10, 2020.

  1. TheRealRan

    TheRealRan

    Joined:
    Jun 3, 2019
    Posts:
    18
  2. TheRealRan

    TheRealRan

    Joined:
    Jun 3, 2019
    Posts:
    18
    I was able to kinda give an event to the popup field, but the event is reading when I scroll here:

    upload_2020-11-10_17-50-42.png

    Not when I scroll here:

    upload_2020-11-10_17-50-55.png

    Anyone knows how to add it to the dropdown options?

    I did it with the following code:

    Code (CSharp):
    1. popupField.RegisterCallback<WheelEvent>(callback =>
    2. {
    3.     Debug.Log(callback.delta);
    4. });