cache il2cpp type

This commit is contained in:
Az committed 2026-10-11 12:29:32 -04:00
1 parent d5b08a7145
commit 3982867943
1 file changed
+2 -1
@@ -38,10 +38,11 @@ public class LoadableBundleSubAssetHolder(string[] names, AssetBundle bundle)
return;
var newSprites = new List<Sprite>();
var type = Il2CppType.From(typeof(Sprite));
foreach (var name in names)
{
var loadedAssets = bundle.LoadAssetWithSubAssets(name, Il2CppType.From(typeof(Sprite)))
var loadedAssets = bundle.LoadAssetWithSubAssets(name, type)
?? throw new InvalidOperationException($"INVALID ASSETS: {name}");
foreach (var obj in loadedAssets)