Нет описания
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

TextLimitDrawer.cs 749B

123456789101112131415161718192021222324
  1. using UnityEditor;
  2. using UnityEngine;
  3. using XCharts.Runtime;
  4. namespace XCharts.Editor
  5. {
  6. [CustomPropertyDrawer(typeof(TextLimit), true)]
  7. public class TextLimitDrawer : BasePropertyDrawer
  8. {
  9. public override string ClassName { get { return "TextLimit"; } }
  10. public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
  11. {
  12. base.OnGUI(pos, prop, label);
  13. if (MakeComponentFoldout(prop, "m_Enable", true))
  14. {
  15. ++EditorGUI.indentLevel;
  16. PropertyField(prop, "m_MaxWidth");
  17. PropertyField(prop, "m_Gap");
  18. PropertyField(prop, "m_Suffix");
  19. --EditorGUI.indentLevel;
  20. }
  21. }
  22. }
  23. }