Fixed a build compatibility error

This commit is contained in:
monitor1394
2021-01-21 12:34:48 +08:00
parent 2a0782e5aa
commit 104a0cb15d
6 changed files with 11 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
#if UNITY_EDITOR
/************************************************/
/* */
/* Copyright (c) 2018 - 2021 monitor1394 */
@@ -90,4 +91,5 @@ namespace XCharts
}
}
}
}
}
#endif

View File

@@ -412,8 +412,10 @@ namespace XCharts
}
}
#if UNITY_EDITOR
public static void EnableTextMeshPro()
{
DefineSymbolsUtil.AddGlobalDefine("dUI_TextMeshPro");
RemoveAllChartObject();
}
@@ -423,5 +425,6 @@ namespace XCharts
DefineSymbolsUtil.RemoveGlobalDefine("dUI_TextMeshPro");
RemoveAllChartObject();
}
#endif
}
}

View File

@@ -18,9 +18,9 @@ namespace XCharts
public class XChartsSettings : ScriptableObject
{
[SerializeField] private Font m_Font;
[SerializeField] private Font m_Font = null;
#if dUI_TextMeshPro
[SerializeField] private TMP_FontAsset m_TMPFont;
[SerializeField] private TMP_FontAsset m_TMPFont = null;
#endif
[SerializeField] [Range(1, 200)] private int m_FontSizeLv1 = 28;
[SerializeField] [Range(1, 200)] private int m_FontSizeLv2 = 24;