优化主题Theme的导入和字体自动刷新 (#148)

This commit is contained in:
monitor1394
2021-06-12 14:32:23 +08:00
parent c9f6e9ef66
commit 998a066c59
15 changed files with 272 additions and 69 deletions

View File

@@ -30,9 +30,6 @@ namespace XCharts
public string homepage = "";
}
#if UNITY_EDITOR
[InitializeOnLoad]
#endif
[ExecuteInEditMode]
public class XChartsMgr : MonoBehaviour
{
@@ -67,19 +64,13 @@ namespace XCharts
}
}
private XChartsMgr()
{
}
static XChartsMgr()
{
#if UNITY_EDITOR
EditorApplication.delayCall += () =>
{
var mgr = XChartsMgr.Instance;
};
#endif
[InitializeOnLoadMethod]
private static void OnInitializeOnLoadMethod()
{
XThemeMgr.ReloadThemeList();
}
#endif
private void Awake()
{