Без опису
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

IconStyleDrawer.cs 1.0KB

123456789101112131415161718192021222324252627282930
  1. using UnityEditor;
  2. using UnityEngine;
  3. using XCharts.Runtime;
  4. namespace XCharts.Editor
  5. {
  6. [CustomPropertyDrawer(typeof(IconStyle), true)]
  7. public class IconStyleDrawer : BasePropertyDrawer
  8. {
  9. public override string ClassName { get { return "IconStyle"; } }
  10. public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
  11. {
  12. base.OnGUI(pos, prop, label);
  13. if (MakeComponentFoldout(prop, "m_Show", true))
  14. {
  15. ++EditorGUI.indentLevel;
  16. PropertyField(prop, "m_Layer");
  17. PropertyField(prop, "m_Align");
  18. PropertyField(prop, "m_Sprite");
  19. PropertyField(prop, "m_Type");
  20. PropertyField(prop, "m_Color");
  21. PropertyField(prop, "m_Width");
  22. PropertyField(prop, "m_Height");
  23. PropertyField(prop, "m_Offset");
  24. PropertyField(prop, "m_AutoHideWhenLabelEmpty");
  25. --EditorGUI.indentLevel;
  26. }
  27. }
  28. }
  29. }