mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-20 01:46:21 +00:00
Unstrip AssetBundle#Unload
This commit is contained in:
2 files changed
+11
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,8 @@ namespace Reactor.Unstrip
|
||||
standard = sprite,
|
||||
inputField = sprite
|
||||
};
|
||||
|
||||
bundle.Unload();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user