修复问题,优化bug和游戏,resource资源拆迁
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections;
|
||||
|
||||
@@ -7,6 +7,16 @@ public class SongDataLibrary : MonoBehaviour
|
||||
public static SongDataLibrary Instance;
|
||||
private Dictionary<int, SongData> songDataDictionary = new Dictionary<int, SongData>();
|
||||
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
private static void EnsureRuntimeInstance()
|
||||
{
|
||||
if (Instance != null) return;
|
||||
if (Object.FindAnyObjectByType<SongDataLibrary>() != null) return;
|
||||
var go = new GameObject(nameof(SongDataLibrary));
|
||||
Object.DontDestroyOnLoad(go);
|
||||
go.AddComponent<SongDataLibrary>();
|
||||
}
|
||||
|
||||
// Documentation text normalized.
|
||||
// Documentation text normalized.
|
||||
public string[] subfolderNames;
|
||||
|
||||
Reference in New Issue
Block a user