大修
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user