mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 23:40:10 +00:00
优化主题Theme的导入和字体自动刷新 (#148)
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
@@ -63,7 +70,8 @@ namespace XCharts
|
||||
private static bool IsThemeAsset(string assetPath)
|
||||
{
|
||||
if (!assetPath.EndsWith(".json")) return false;
|
||||
if (!assetPath.StartsWith("XTheme")) return false;
|
||||
var assetName = Path.GetFileNameWithoutExtension(assetPath);
|
||||
if (!assetName.StartsWith(XChartsSettings.THEME_ASSET_NAME_PREFIX)) return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user