- Home /
 
               Question by 
               e-bonneville · Jul 27, 2010 at 08:37 PM · 
                guienumpopup  
              
 
              How to use EnumPopup
Sorry, I'm having a brainfreeze. Would someone be so kind as to post the correct syntax to use for EnumPopup?
Thanks - Elliot B.
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Mike 3 · Jul 27, 2010 at 09:14 PM
It should just be:
selected = (YourEnum)EditorGUI.EnumPopup(rectForPopupButton, selected);
or
selected = (YourEnum)EditorGUILayout.EnumPopup(selected);
if you're just using the simplest overloads, where selected is of type YourEnum, and declared as a member variable
Worked great for me. I was a bit confused on how to properly use enum in editor scripts.
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                