mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-19 06:50:18 +00:00
优化自定义主题Theme的自动刷新 (#148)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -23,6 +24,12 @@ namespace XCharts
|
||||
|
||||
public static void CheckAddedAsset(string assetPath)
|
||||
{
|
||||
var fileName = Path.GetFileName(assetPath);
|
||||
if (fileName.Equals("XChartsSettings.asset"))
|
||||
{
|
||||
XThemeMgr.ReloadThemeList();
|
||||
return;
|
||||
}
|
||||
if (!IsThemeAsset(assetPath)) return;
|
||||
var obj = AssetDatabase.LoadAssetAtPath<TextAsset>(assetPath);
|
||||
if (obj == null || obj.text == null) return;
|
||||
|
||||
Reference in New Issue
Block a user