Search Unity

How can I make a button with the "+" plus symbol to add to a EditorGUILayout.Popup ?

Discussion in 'Immediate Mode GUI (IMGUI)' started by DubiDuboni, Jun 28, 2019.

  1. DubiDuboni

    DubiDuboni

    Joined:
    Feb 5, 2019
    Posts:
    49
    This is my code inside the OnGUI

    Code (csharp):
    1.  
    2. void OnGUI()
    3.     {
    4.         int selected = 0;
    5.         string[] options = new string[]
    6.         {
    7.      "Option1", "Option2", "Option3",
    8.         };
    9.         selected = EditorGUILayout.Popup("Label", selected, options);
    10.      }
    11.  
    The result is :
    The label is in black on the left and the popup with the options 1,2,3 in more or less in the middle :



    And this is how I want it to looks like :



    I'm not sure how to create this custom popup with the "+" plus on the right.