功能批量实现 优化 服务端 新浮动小游戏框架 新界面UI
This commit is contained in:
@@ -102,7 +102,7 @@ public class SongDataLibrary : MonoBehaviour
|
||||
|
||||
private IEnumerator LoadFromPath(string path, string label)
|
||||
{
|
||||
SongData[] assets = Resources.LoadAll<SongData>(path);
|
||||
SongData[] assets = RuntimeResourcesCache.LoadSongsFromPath(path);
|
||||
if (assets == null || assets.Length == 0)
|
||||
{
|
||||
if (logLoadProgress)
|
||||
@@ -121,7 +121,6 @@ public class SongDataLibrary : MonoBehaviour
|
||||
}
|
||||
if (!songDataDictionary.ContainsKey(data.songID))
|
||||
{
|
||||
data.LoadPersistent(); // 启动时从持久化存档恢复数据
|
||||
songDataDictionary.Add(data.songID, data);
|
||||
if (logLoadProgress)
|
||||
{
|
||||
@@ -157,7 +156,6 @@ public class SongDataLibrary : MonoBehaviour
|
||||
if (data == null) continue;
|
||||
if (!songDataDictionary.ContainsKey(data.songID))
|
||||
{
|
||||
data.LoadPersistent(); // 启动时从持久化存档恢复数据
|
||||
songDataDictionary.Add(data.songID, data);
|
||||
if (logLoadProgress)
|
||||
{
|
||||
@@ -180,7 +178,9 @@ public SongData GetSongDataByID(int songID)
|
||||
{
|
||||
if (songDataDictionary.ContainsKey(songID))
|
||||
{
|
||||
return songDataDictionary[songID];
|
||||
SongData data = songDataDictionary[songID];
|
||||
data.EnsurePersistentDataLoaded();
|
||||
return data;
|
||||
}
|
||||
Debug.LogError("未找到 songID: " + songID);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user