mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-30 13:28:47 +00:00
3.0
This commit is contained in:
@@ -8,11 +8,6 @@ namespace XCharts.Editor
|
|||||||
[CustomEditor(typeof(XCSettings))]
|
[CustomEditor(typeof(XCSettings))]
|
||||||
public class XCSettingsEditor : UnityEditor.Editor
|
public class XCSettingsEditor : UnityEditor.Editor
|
||||||
{
|
{
|
||||||
internal class Styles
|
|
||||||
{
|
|
||||||
public static readonly GUIContent defaultFontAssetLabel = new GUIContent("Default Font Asset", "The Font Asset that will be assigned by default to newly created text objects when no Font Asset is specified.");
|
|
||||||
public static readonly GUIContent defaultFontAssetPathLabel = new GUIContent("Path: Resources/", "The relative path to a Resources folder where the Font Assets and Material Presets are located.\nExample \"Fonts & Materials/\"");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if UNITY_2018_3_OR_NEWER
|
#if UNITY_2018_3_OR_NEWER
|
||||||
@@ -48,7 +43,7 @@ namespace XCharts.Editor
|
|||||||
static SettingsProvider[] CreateXCSettingsProvider()
|
static SettingsProvider[] CreateXCSettingsProvider()
|
||||||
{
|
{
|
||||||
var providers = new System.Collections.Generic.List<SettingsProvider> { new XCResourceImporterProvider() };
|
var providers = new System.Collections.Generic.List<SettingsProvider> { new XCResourceImporterProvider() };
|
||||||
|
var isExist = File.Exists("Assets/XCharts/Resources/XCSettings.asset");
|
||||||
if (GetSettings() != null)
|
if (GetSettings() != null)
|
||||||
{
|
{
|
||||||
var provider = new AssetSettingsProvider("Project/XCharts/Settings", GetSettings);
|
var provider = new AssetSettingsProvider("Project/XCharts/Settings", GetSettings);
|
||||||
|
|||||||
@@ -129,6 +129,8 @@ namespace XCharts.Runtime
|
|||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
if (s_Instance == null)
|
if (s_Instance == null)
|
||||||
{
|
{
|
||||||
|
var isExist = System.IO.File.Exists("Assets/XCharts/Resources/XCSettings.asset");
|
||||||
|
if(isExist)
|
||||||
XChartsPackageResourceImporterWindow.ShowPackageImporterWindow();
|
XChartsPackageResourceImporterWindow.ShowPackageImporterWindow();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -23,11 +23,14 @@ namespace XCharts.Runtime
|
|||||||
XChartsMgr.themeNames.Clear();
|
XChartsMgr.themeNames.Clear();
|
||||||
AddTheme(LoadTheme(ThemeType.Default));
|
AddTheme(LoadTheme(ThemeType.Default));
|
||||||
AddTheme(LoadTheme(ThemeType.Dark));
|
AddTheme(LoadTheme(ThemeType.Dark));
|
||||||
|
if (XCSettings.Instance != null)
|
||||||
|
{
|
||||||
foreach (var theme in XCSettings.customThemes)
|
foreach (var theme in XCSettings.customThemes)
|
||||||
{
|
{
|
||||||
AddTheme(theme);
|
AddTheme(theme);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void CheckReloadTheme()
|
public static void CheckReloadTheme()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user