示例#1
0
 protected void DrawEnumPropertyDropDown(EnumProperty property)
 {
     if (property != null && property.IsValid())
     {
         BeginHorizontal();
         EditorGUILayout.PrefixLabel(property.Name);
         property.CurrentValueIndex = EditorGUILayout.Popup(property.CurrentValueIndex,
                                                            property.ValuesNames);
         EndHorizontal();
     }
 }
示例#2
0
 protected void DrawEnumPropertyGrid(EnumProperty property, int nbRows)
 {
     if (property != null && property.IsValid())
     {
         DrawTitleLabel(property.Name);
         property.CurrentValueIndex = GUILayout.SelectionGrid(property.CurrentValueIndex,
                                                              property.ValuesNames,
                                                              nbRows,
                                                              EditorStyles.radioButton);
         EditorGUILayout.Space();
     }
 }