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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

EditorGUILayout.EnumPopup and scrolling

Discussion in 'Scripting' started by pbeverley, Sep 21, 2015.

  1. pbeverley

    pbeverley

    Joined:
    Jul 30, 2015
    Posts:
    2
    I have a rather large enum I generate, and is still growing at this time. With the number of elements involved, it is getting rather annoying to get to the newly added enums at the bottom of the list.

    What I would like is a way to use the scroll wheel to quickly move through the list, or have some other way to be able to go through the various enums. Is there any way to do this?

    This is all I have at the moment for my enums:

    public override void OnInspectorGUI()
    {
    values = (StringEnums)EditorGUILayout.EnumPopup("String Tag", values);
    }
     
  2. Sykoo

    Sykoo

    Joined:
    Jul 25, 2014
    Posts:
    1,394
  3. pbeverley

    pbeverley

    Joined:
    Jul 30, 2015
    Posts:
    2
    The problem is listing a large amount of enums and allowing the user to select one. I don't see a way to put the enums into the scroll view to easily go through them, and I don't see a way to make the enumPopup scrollable.
     
  4. ChungInyoung

    ChungInyoung

    Joined:
    Nov 29, 2016
    Posts:
    1
    I am in the same situation in 2020.
    The wheel does not work in Windows OS.
    It works fine on Mac OS.
    Is there any way?
     
  5. Raseru

    Raseru

    Joined:
    Oct 4, 2013
    Posts:
    87
    Scroll wheel should definitely get support here. It takes forever to scroll just a little bit down. With a giant list of enums you're going to hate yourself.