Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于 RuntimeIl2CppDumper 一些 TODO 的疑问 #223

Open
shukebeita1126 opened this issue Nov 29, 2024 · 0 comments
Open

关于 RuntimeIl2CppDumper 一些 TODO 的疑问 #223

shukebeita1126 opened this issue Nov 29, 2024 · 0 comments

Comments

@shukebeita1126
Copy link

shukebeita1126 commented Nov 29, 2024

你好,
对于 inflated Methodgeneric Method, 我要如何 完成这些 TODO 呢?
我希望通过你的指点 && 我的学习, 完成 仓库中的 TODO

目前, 我遇到了以下的两个问题, 苦恼了将近 1 周

i.e.
Namespace: UnityEngine
class GameObject,
T GetComponent<T>() 
我通过 打印 MethodInfo 内的数据, 得到了以下的信息:
ClassTypeName: UnityEngine.GameObject
method(生成):
  method: T GetComponent()
  address: 0x71E6067BD4, off: 0x1608BD4, flags: 0x00000086, iflags: 0x00000000
methodDefinition:
  nameIndex: 608271, declaringType: 4759, returnType: 736, parameterStart: -1, genericContainerIndex: 100665871
  token: 0x8000000, flags: 0xBC01, iflags: 0x0000, slot: 65535, parameterCount: 65535

我要如何在运行时, 拿到 实现模板的方法的元数据(MethodInfo*)?

我尝试过, 通过 IL2CppDumper (静态版) 给出的 Tips:
知道了 Class N 实现了这个模板函数, 然后, 找到这个类的 Il2CppClass,
但, 通过 迭代 Methods, 也无法拿到 GameObject.GetComponent() 的实现,

i.e.
if(il2cpp_method_is_inflated(method) == True)
{
    int32_t real_param_counts = ???;
}
如果一个 Method 位段标记为 膨胀(is_inflated : 1), 我给如何获取到 他真实的参数呢?
以及, 我要如何判断, 这个膨胀方法, 是否需要在调用的时候, 传递 MethodInfo * 呢?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant