asr::game_engine::unity::il2cpp

Struct Module

Source
pub struct Module { /* private fields */ }
Available on crate feature unity only.
Expand description

Represents access to a Unity game that is using the IL2CPP backend.

Implementations§

Source§

impl Module

Source

pub fn attach_auto_detect(process: &Process) -> Option<Self>

Tries attaching to a Unity game that is using the IL2CPP backend. This function automatically detects the IL2CPP version. If you know the version in advance or it fails detecting it, use attach instead.

Source

pub fn attach(process: &Process, version: Version) -> Option<Self>

Tries attaching to a Unity game that is using the IL2CPP backend with the IL2CPP version provided. The version needs to be correct for this function to work. If you don’t know the version in advance, use attach_auto_detect instead.

Source

pub fn get_image(&self, process: &Process, assembly_name: &str) -> Option<Image>

Looks for the specified binary image inside the target process. An image is a .NET DLL that is loaded by the game. The Assembly-CSharp image is the main game assembly, and contains all the game logic. The get_default_image function is a shorthand for this function that accesses the Assembly-CSharp image.

Source

pub fn get_default_image(&self, process: &Process) -> Option<Image>

Looks for the Assembly-CSharp binary image inside the target process. An image is a .NET DLL that is loaded by the game. The Assembly-CSharp image is the main game assembly, and contains all the game logic. This function is a shorthand for get_image that accesses the Assembly-CSharp image.

Source

pub async fn wait_attach_auto_detect(process: &Process) -> Module

Attaches to a Unity game that is using the IL2CPP backend. This function automatically detects the IL2CPP version. If you know the version in advance or it fails detecting it, use wait_attach instead.

This is the awaitable version of the attach_auto_detect function, yielding back to the runtime between each try.

Source

pub async fn wait_attach(process: &Process, version: Version) -> Module

Attaches to a Unity game that is using the IL2CPP backend with the IL2CPP version provided. The version needs to be correct for this function to work. If you don’t know the version in advance, use wait_attach_auto_detect instead.

This is the awaitable version of the attach function, yielding back to the runtime between each try.

Source

pub async fn wait_get_image( &self, process: &Process, assembly_name: &str, ) -> Image

Looks for the specified binary image inside the target process. An image is a .NET DLL that is loaded by the game. The Assembly-CSharp image is the main game assembly, and contains all the game logic. The wait_get_default_image function is a shorthand for this function that accesses the Assembly-CSharp image.

This is the awaitable version of the get_image function, yielding back to the runtime between each try.

Source

pub async fn wait_get_default_image(&self, process: &Process) -> Image

Looks for the Assembly-CSharp binary image inside the target process. An image is a .NET DLL that is loaded by the game. The Assembly-CSharp image is the main game assembly, and contains all the game logic. This function is a shorthand for wait_get_image that accesses the Assembly-CSharp image.

This is the awaitable version of the get_default_image function, yielding back to the runtime between each try.

Auto Trait Implementations§

§

impl Freeze for Module

§

impl RefUnwindSafe for Module

§

impl Send for Module

§

impl Sync for Module

§

impl Unpin for Module

§

impl UnwindSafe for Module

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.