mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 00:20:18 +00:00
优化自定义主题Theme的自动刷新 (#148)
This commit is contained in:
@@ -94,6 +94,14 @@ namespace XCharts
|
||||
newtheme.theme = Theme.Custom;
|
||||
newtheme.themeName = themeNewName;
|
||||
|
||||
if (!Directory.Exists(Application.dataPath + "/XCharts"))
|
||||
{
|
||||
Directory.CreateDirectory(Application.dataPath + "/XCharts");
|
||||
}
|
||||
if (!Directory.Exists(Application.dataPath + "/XCharts/Resources"))
|
||||
{
|
||||
Directory.CreateDirectory(Application.dataPath + "/XCharts/Resources");
|
||||
}
|
||||
var themeFileName = "XTheme-" + newtheme.themeName;
|
||||
var assetPath = string.Format("Assets/XCharts/Resources/{0}", themeFileName);
|
||||
var filePath = string.Format("{0}/../{1}.json", Application.dataPath, assetPath);
|
||||
|
||||
Reference in New Issue
Block a user