mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
cache il2cpp type
This commit is contained in:
1 file changed
+2
-1
@@ -38,10 +38,11 @@ public class LoadableBundleSubAssetHolder(string[] names, AssetBundle bundle)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var newSprites = new List<Sprite>();
|
var newSprites = new List<Sprite>();
|
||||||
|
var type = Il2CppType.From(typeof(Sprite));
|
||||||
|
|
||||||
foreach (var name in names)
|
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}");
|
?? throw new InvalidOperationException($"INVALID ASSETS: {name}");
|
||||||
|
|
||||||
foreach (var obj in loadedAssets)
|
foreach (var obj in loadedAssets)
|
||||||
|
|||||||
Reference in new issue
Block a user