public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
 {
     if (property.propertyType != SerializedPropertyType.Enum)
     {
         base.OnGUI(position, property, label);
         return;
     }
     if (GUI.Button(position, $"selectKey:{((KeyCode) property.intValue).ToString()}"))
     {
         KeyCodeSelectWindow.Open(property);
     }
 }
Пример #2
0
 public static void Open(SerializedProperty assignTargetProp)
 {
     if (assignTargetProp == null)
     {
         Debug.LogError("プロパティがnullです");
         return;
     }
     if (mainWindow == null)
     {
         mainWindow = CreateInstance <KeyCodeSelectWindow>();
     }
     mainWindow.assignTargetProp = assignTargetProp;
     mainWindow.Show();
 }