pub struct Il2Cpp { /* private fields */ }Expand description
The game’s Il2Cpp runtime.
Implementations§
Source§impl Il2Cpp
impl Il2Cpp
Sourcepub fn loaded() -> Result<&'static Il2Cpp>
pub fn loaded() -> Result<&'static Il2Cpp>
The runtime of the game binary already loaded in this process.
Sourcepub fn load(path: impl AsRef<Path>) -> Result<&'static Il2Cpp>
pub fn load(path: impl AsRef<Path>) -> Result<&'static Il2Cpp>
Loads a game binary into this process, e.g. to run a game’s code without Unity.
Sourcepub fn get() -> Option<&'static Il2Cpp>
pub fn get() -> Option<&'static Il2Cpp>
The instance set up by Il2Cpp::loaded or Il2Cpp::load.
pub fn api(&self) -> &Api
Sourcepub fn init_standalone(&self, data_dir: impl AsRef<Path>) -> Result<()>
pub fn init_standalone(&self, data_dir: impl AsRef<Path>) -> Result<()>
Starts the runtime without Unity, given the game’s <Game>_Data/il2cpp_data folder.
Only the game’s pure .NET code can run this way; anything calling into Unity will fail.
Sourcepub fn attach_thread(&self)
pub fn attach_thread(&self)
Lets the calling thread run managed code. Needed on threads the game didn’t start.
Sourcepub fn class(
&'static self,
assembly: &str,
namespace: &str,
name: &str,
) -> Result<Class>
pub fn class( &'static self, assembly: &str, namespace: &str, name: &str, ) -> Result<Class>
Finds a class, e.g. class("Assembly-CSharp", "Game.Player", "Health").
Sourcepub fn string(&self, value: &str) -> Result<Il2CppString>
pub fn string(&self, value: &str) -> Result<Il2CppString>
A new managed string.
Sourcepub fn byte_array(&'static self, bytes: &[u8]) -> Result<Object>
pub fn byte_array(&'static self, bytes: &[u8]) -> Result<Object>
A new managed byte[] holding a copy of bytes, e.g. to pass to
Texture2D.LoadRawTextureData.
Sourcepub unsafe fn read_string(&self, string: Object) -> Option<String>
pub unsafe fn read_string(&self, string: Object) -> Option<String>
Auto Trait Implementations§
impl Freeze for Il2Cpp
impl RefUnwindSafe for Il2Cpp
impl Send for Il2Cpp
impl Sync for Il2Cpp
impl Unpin for Il2Cpp
impl UnsafeUnpin for Il2Cpp
impl UnwindSafe for Il2Cpp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more