Publish verified live restoration source snapshot and known limits

This commit is contained in:
0xcjy
2026-10-01 19:42:22 +08:00
parent 0dd0d3bdaa
commit d70a65c7ce
896 changed files with 105420 additions and 12745 deletions
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -81,15 +81,19 @@ public class UmaDatabaseEntry
public T Get<T>(bool withDependencies = true)
{
Object asset = UmaAssetManager.LoadAssetBundle(this, isRecursive: withDependencies)
.LoadAllAssets().FirstOrDefault(a=>a.GetType() == typeof(T));
Object[] loaded = UmaAssetManager.LoadAssetBundle(this, isRecursive: withDependencies).LoadAllAssets();
Object asset = loaded.FirstOrDefault(a => a.GetType() == typeof(T));
if (Gallop.Live.LiveRuntimeDiagnostics.Enabled)
Gallop.Live.LiveRuntimeDiagnostics.RecordAssetLoad(Name, "Get", typeof(T), loaded, asset);
return (T)System.Convert.ChangeType(asset, typeof(T));
}
public IEnumerable<T> GetAll<T>(bool withDependencies = true)
{
IEnumerable<Object> assets = UmaAssetManager.LoadAssetBundle(this, isRecursive: withDependencies)
.LoadAllAssets().Where(a => a.GetType() == typeof(T));
Object[] loaded = UmaAssetManager.LoadAssetBundle(this, isRecursive: withDependencies).LoadAllAssets();
if (Gallop.Live.LiveRuntimeDiagnostics.Enabled)
Gallop.Live.LiveRuntimeDiagnostics.RecordAssetLoad(Name, "GetAll", typeof(T), loaded);
IEnumerable<Object> assets = loaded.Where(a => a.GetType() == typeof(T));
return assets.Select(asset => (T)System.Convert.ChangeType(asset, typeof(T)));
}