Hooks in ResourceAndAssetHooks related with AssetBundle do not work.
extern methods do not work in IL2CPP
LoadFromFile_Internal
LoadAssetWithSubAssets_Internal
etc
LoadAll is obsolete
Below is from 2021.3.20f1
[EditorBrowsable(1)]
[Obsolete("Method LoadAll has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAllAssets instead and check the documentation for details.", true)]
public Object[] LoadAll()
{
return null;
}
LoadAllAssets uses LoadAssetWithSubAssets_Internal, but as stated previously, none of these extern*_Internal APIs work.
Since none of the internal APIs work, APIs with multiple overloads such as LoadFromFile needs hooks for each APIs.
By the way:
public Object[] LoadAllAssets()
{
return this.LoadAllAssets(typeof(Object));
}
public T[] LoadAllAssets<T>() where T : Object
{
return AssetBundle.ConvertObjects<T>(this.LoadAllAssets(typeof(T)));
}
public Object[] LoadAllAssets(Type type)
{
bool flag = type == null;
if (flag)
{
throw new NullReferenceException("The input type cannot be null.");
}
return this.LoadAssetWithSubAssets_Internal("", type);
}
This is from the managed unity-libs souce code
Not sure why hooking public Object[] LoadAllAssets(Type type) does not work, but hooking public Object[] LoadAllAssets() works.
Hooks in
ResourceAndAssetHooks
related withAssetBundle
do not work.extern
methods do not work in IL2CPPLoadFromFile_Internal
LoadAssetWithSubAssets_Internal
LoadAll
is obsolete Below is from2021.3.20f1
LoadAllAssets
usesLoadAssetWithSubAssets_Internal
, but as stated previously, none of theseextern
*_Internal
APIs work.LoadFromFile
needs hooks for each APIs.By the way:
This is from the managed
unity-libs
souce code Not sure why hookingpublic Object[] LoadAllAssets(Type type)
does not work, but hookingpublic Object[] LoadAllAssets()
works.