Expand description
A high level view of an Il2Cpp game: types, fields and methods by name, with their types already resolved.
Game owns the parsed metadata and binary; TypeView, FieldView,
MethodView and ParameterView are cheap borrowed views into it.
use hao_il2cpp::Game;
let game = Game::open("path/to/game")?;
let player = game.find_type("PlayerController").expect("no such type");
println!("{} : {:?}", player.full_name(), player.base_type_name());
for field in player.fields() {
println!(" {field}"); // `float speed`, `static int count = 3`
}
if let Some(update) = player.find_method("Update") {
println!("Update is at {:#x?}", update.code_address());
}Structsยง
- Field
View - A field of a
TypeView. ItsDisplayis C#-like:static int count = 3. - Game
- A Unity Il2Cpp game: its metadata and the type table from its binary.
- Method
View - A method of a
TypeView. ItsDisplayis a C#-like signature:static string Concat(string str0, string str1). - Parameter
View - A parameter of a
MethodView. - Type
View - A type definition in a
Game, fromGame::typesorGame::find_type.