4 namespace HKI.Core.Loc.Editor
9 [CustomPropertyDrawer(typeof(TextLocalization.TextLocalizationElement))]
13 public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
15 float languageRectWidth = 80.0f;
18 Rect languageRect =
new Rect(position.x, position.y, languageRectWidth, position.height);
19 Rect localizationTextRect =
new Rect(position.x + languageRectWidth + space, position.y, position.width - languageRectWidth - space, position.height);
21 EditorGUI.PropertyField(languageRect, property.FindPropertyRelative(
"Language"), GUIContent.none);
22 EditorGUI.PropertyField(localizationTextRect, property.FindPropertyRelative(
"Text"), GUIContent.none);
override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
Custom property drawer for the TextLocalizationElement class.