Unstrip AssetBundle#Unload

This commit is contained in:
js6pak committed 2021-01-09 20:10:58 +01:00
1 parent 45d8773865
commit 4ead2222d2
2 files changed
+11

No files matched your search

+9
View File
@@ -59,5 +59,14 @@ namespace Reactor.Unstrip
return ptr == IntPtr.Zero ? null : new UnityEngine.Object(ptr).TryCast<T>();
}
private delegate IntPtr d_Unload(IntPtr __instance, bool unloadAllLoadedObjects);
private static readonly d_Unload i_Unload = IL2CPP.ResolveICall<d_Unload>("UnityEngine.AssetBundle::Unload");
public void Unload(bool unloadAllLoadedObjects = false)
{
i_Unload.Invoke(Pointer, unloadAllLoadedObjects);
}
}
}
+2
View File
@@ -33,6 +33,8 @@ namespace Reactor.Unstrip
standard = sprite,
inputField = sprite
};
bundle.Unload();
}
}
}