暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

AnimationDrawer.cs 1.2KB

123456789101112131415161718192021222324252627282930313233
  1. using UnityEditor;
  2. using UnityEngine;
  3. using XCharts.Runtime;
  4. namespace XCharts.Editor
  5. {
  6. [CustomPropertyDrawer(typeof(AnimationStyle), true)]
  7. public class AnimationDrawer : BasePropertyDrawer
  8. {
  9. public override string ClassName { get { return "Animation"; } }
  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_Type");
  17. PropertyField(prop, "m_FadeInDuration");
  18. PropertyField(prop, "m_FadeInDelay");
  19. PropertyField(prop, "m_FadeOutDuration");
  20. PropertyField(prop, "m_FadeOutDelay");
  21. PropertyField(prop, "m_DataChangeEnable");
  22. PropertyField(prop, "m_DataChangeDuration");
  23. PropertyField(prop, "m_UnscaledTime");
  24. // using(new EditorGUI.DisabledGroupScope(true))
  25. // {
  26. // PropertyField(prop, "m_ActualDuration");
  27. // }
  28. --EditorGUI.indentLevel;
  29. }
  30. }
  31. }
  32. }