-
Notifications
You must be signed in to change notification settings - Fork 207
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
How can I obtain the attribute values in Level #566
Comments
Hello, you first need to retrieve the UniTask result. import "frida-il2cpp-bridge";
function getUniTaskResult(uniTaskObj: Il2Cpp.Object): any {
const awaiter = uniTaskObj.method("GetAwaiter").invoke() as Il2Cpp.Object;
while (!(awaiter.method("get_IsCompleted").invoke() as boolean)) {}
return awaiter.method("GetResult").invoke();
} Here's how you can use it Il2Cpp.perform(() => {
const AsemblyCSharp = Il2Cpp.domain.assembly("Assembly-CSharp").image;
const ExampleClass = AsemblyCSharp.class("LevelDataManager");
const loadLevelMethod = ExampleClass.method("LoadLevel");
const uniTaskObj = loadLevelMethod.invoke(2) as Il2Cpp.Object;
const result = getUniTaskResult(uniTaskObj) as Il2Cpp.Object;
console.log(result)
}); You can tweak the code as needed but this should help you fix your issue ! (this code assumes that LoadLevel is static but it's not) |
Thank you for answering the question I raised due to my insufficient development skills. I can now use the Level object |
This is part of the content of the level class
This is the function being called and the return value
This is my code
This is the output result
The help needed
I cannot get what I want through field and method, new Il2Cpp.Object(levelItem.handle) also doesn't work
The problem seems to be with the return value UniTask, which I cannot handle
The text was updated successfully, but these errors were encountered: