This commit is contained in:
SoulliesOfficial
2026-03-14 02:30:26 -04:00
parent cf86f0ee51
commit aee62cd637
2041 changed files with 246771 additions and 129128 deletions

View File

@@ -2,6 +2,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Ichni.StartMenu;
using SLSUtilities.General;
using TMPro;
using UniRx;
using UnityEngine;
@@ -10,9 +11,10 @@ using UnityEngine.Serialization;
namespace Ichni
{
public class ThemeBundleManager : MonoBehaviour
public class ThemeBundleManager : Singleton<ThemeBundleManager>
{
public static ThemeBundleManager instance;
/// <summary>小写别名,兼容现有调用点</summary>
public new static ThemeBundleManager instance => Instance;
public List<ThemeBundleAbstract> themeBundleAbstractList;
public List<string> selectedThemeBundleList;
@@ -22,23 +24,13 @@ namespace Ichni
public TMP_Text LogWindow;
private void Awake()
protected override void Awake()
{
if (instance == null)
{
instance = this;
DontDestroyOnLoad(gameObject);
}
else if (instance != this)
{
Destroy(gameObject);
}
Initialize(true); // DontDestroyOnLoad 持久化单例
loadedThemeBundleList = new List<ThemeBundle>();
AssetBundle.UnloadAllAssetBundles(true);
LoadAllThemeBundlesAbstract();
//LoadThemeBundle("basic");
//LoadThemeBundle("departure_to_multiverse");
}
public bool TryGetThemeBundle(string themeBundleName, out ThemeBundle themeBundle)