You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letunityframework=Il2Cpp.domain.assembly("Assembly-CSharp");constGameManager=unityframework.image.class("GameManager");letadjustConversationLevels=GameManager.field("adjustConversationLevels");letOpenLevel=GameManager.method("OpenLevel");OpenLevel.implementation=function(this: any,level: any){//trying to call adjustConversationLevels from herethis.method(OpenLevel.name,1).invoke(level);};
but there's no Il2Cpp.Dictionary so how to get those values?
The text was updated successfully, but these errors were encountered:
It's a Il2Cpp.Object. That's how I would write the script:
constAssemblyCSharp=Il2Cpp.domain.assembly("Assembly-CSharp").image;constGameManager=AssemblyCSharp.class("GameManager");// @ts-ignoreGameManager.method("OpenLevel").implementation=function(this: Il2Cpp.Object|Il2Cpp.Class,level: any): any{constadjustConversationLevels=this.field<Il2Cpp.Object>("adjustConversationLevels").value;// do whatever you want with adjustConversationLevels, it's a Il2Cpp.Object// let's print its classconsole.log(adjustConversationLevels.class);returnthis.method("OpenLevel",1).invoke(level);};
// @ts-ignore
GameManager.method("OpenLevel").implementation = function (this: Il2Cpp.Object | Il2Cpp.Class, level: any): any {
const adjustConversationLevels = this.field<Il2Cpp.Object>("adjustConversationLevels").value;
// do whatever you want with adjustConversationLevels, it's a Il2Cpp.Object
// let's print its class
console.log(adjustConversationLevels.class);
return this.method("OpenLevel", 1).invoke(level);
};
Thank you but I mean adjustConversationLevels contain the values I wanna get but I don't know how to get those
I'm trying to get the values of this field
It's
System.Collections.Generic.Dictionary`2[System.Int32,System.String]
and this is my code
but there's no Il2Cpp.Dictionary so how to get those values?
The text was updated successfully, but these errors were encountered: