diff --git a/Editor/ChildComponents/TextStyleDrawer.cs b/Editor/ChildComponents/TextStyleDrawer.cs
index 70f44b6f..d2239723 100644
--- a/Editor/ChildComponents/TextStyleDrawer.cs
+++ b/Editor/ChildComponents/TextStyleDrawer.cs
@@ -27,14 +27,13 @@ namespace XCharts.Editor
PropertyField(prop, "m_Color");
PropertyField(prop, "m_FontSize");
PropertyField(prop, "m_LineSpacing");
+ PropertyField(prop, "m_Alignment");
+ PropertyField(prop, "m_AutoAlign");
#if dUI_TextMeshPro
PropertyField(prop, "m_TMPFontStyle");
PropertyField(prop, "m_TMPSpriteAsset");
- PropertyField(prop, "m_TMPAlignment");
#else
PropertyField(prop, "m_FontStyle");
- PropertyField(prop, "m_Alignment");
- PropertyField(prop, "m_AutoAlign");
PropertyField(prop, "m_AutoWrap");
#endif
--EditorGUI.indentLevel;
diff --git a/Runtime/Component/Child/TextStyle.cs b/Runtime/Component/Child/TextStyle.cs
index 36c0489e..1f2c55ea 100644
--- a/Runtime/Component/Child/TextStyle.cs
+++ b/Runtime/Component/Child/TextStyle.cs
@@ -27,7 +27,6 @@ namespace XCharts.Runtime
#if dUI_TextMeshPro
[SerializeField] private TMP_FontAsset m_TMPFont;
[SerializeField] private FontStyles m_TMPFontStyle = FontStyles.Normal;
- [SerializeField] private TextAlignmentOptions m_TMPAlignment = TextAlignmentOptions.Left;
[SerializeField][Since("v3.1.0")] private TMP_SpriteAsset m_TMPSpriteAsset;
#endif
public bool show
@@ -147,15 +146,6 @@ namespace XCharts.Runtime
set { if (PropertyUtil.SetStruct(ref m_TMPFontStyle, value)) SetComponentDirty(); }
}
///
- /// the text alignment of TextMeshPro.
- /// ||TextMeshPro字体对齐方式。
- ///
- public TextAlignmentOptions tmpAlignment
- {
- get { return m_TMPAlignment; }
- set { if (PropertyUtil.SetStruct(ref m_TMPAlignment, value)) SetComponentDirty(); }
- }
- ///
/// the sprite asset of TextMeshPro.
/// ||TextMeshPro的Sprite Asset。
///
@@ -214,11 +204,7 @@ namespace XCharts.Runtime
public void UpdateAlignmentByLocation(Location location)
{
-#if dUI_TextMeshPro
- m_TMPAlignment = location.runtimeTMPTextAlignment;
-#else
m_Alignment = location.runtimeTextAlignment;
-#endif
}
public Color GetColor(Color defaultColor)