runtime_class_info
Retrieves real runtime field offsets and method addresses (RVA) for a class to resolve direct hook targets in IL2CPP games. Rejects ambiguous short names; nested types require full nested names.
Instructions
查类的运行时实况:真实字段偏移与方法真实地址(RVA)。
嵌套类型请传完整嵌套名(search_classes 的 nested_name);
短名命中多个时拒绝并给 candidates,不替你猜。
与静态 class_detail 的区别(很重要): · 静态元数据里的字段没有偏移(偏移是运行时泛型实例化后才定的) · 静态元数据里的方法只有 token,没有地址 · 这里给出的是运行时真实值 —— 这才是能直接用来 Hook 的落点
嵌套类型请传完整嵌套名:IL2CPP 的 namespace 只属于最外层类型,
嵌套类型(状态机 State、协程体 d__0、私有内部类)的命名空间是空的、
只有短名。实测 IL2CPP 样本 20,072 个类型里 7,056 个(35%)是嵌套类型,
名为 State 的类型有 131 个而只有 1 个是顶层。所以查嵌套类型时 name
要写成完整嵌套名(如 "TeamTapas.ProjectR.UI2.RUI_FloatingUI.State",
从 search_classes 的 nested_name 直接抄)。只传短名而命中多个时,
本工具返回 ok: false + ambiguous: true + candidates,不会替你猜。
Args:
name: 类名(短名;嵌套类型请传完整嵌套名)。
namespace: 命名空间(可选)。不给也能用:会按短名在顶层类型
里解析,唯一才采用;命中多个则返回 ambiguous: true +
candidates,让你自己指定。嵌套类型必须用完整嵌套名
(candidates[].full_name)—— 只用短名会被拒绝,
不会随便挑一个(短名会撞上同名的嵌套枚举/状态机)。
image: 程序集名(可选,如 "TeamTapas.ProjectR.dll")。
method_filter: 只看名字含该子串的方法(类方法很多时用)。
Returns: {ok, full_name, fields: [{name, type, offset, is_static}], methods: [{name, token, pointer, rva_hex, in_module, param_count}]}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| image | No | ||
| fields | No | ||
| methods | No | ||
| namespace | No | ||
| method_filter | No |