-
Notifications
You must be signed in to change notification settings - Fork 18
Unity 2022.3.10 offsets and/or changes #20
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
base: master
Are you sure you want to change the base?
Conversation
|
So the first step to define a new version is to add a new Once this is done, you can add it to the Normally, these are the only places you should need to modify. If there are other pieces of the code that don't work with that new version, we'll need to investigate more thoroughly. |
| int classCache = this.Process.MonoLibraryOffsets.ImageClassCache; | ||
| var classCacheSize = this.ReadUInt32(classCache + this.Process.MonoLibraryOffsets.HashTableSize); | ||
| var classCacheTableArray = this.ReadPtr(classCache + this.Process.MonoLibraryOffsets.HashTableTable); | ||
| var classCacheSize = this.ReadUInt32(/*classCache + this.Process.MonoLibraryOffsets.HashTableSize*/1256); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I only know the good values for classeCache + HashTableSize and classCache + HashTableTable but I have no idea about the individual values of each offset
| // Get the generic type arguments | ||
| if (this.TypeInfo.TypeCode == TypeCode.GENERICINST) | ||
| { | ||
| this.fieldCount = this.ReadInt32(96); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I can't simply use 96 for the TypeDefinitionFieldCount offset since this line isn't always executed at the same time as the line that uses TypeDefinitionFieldCount
|
|
||
| var fields = new List<FieldDefinition>(); | ||
| if (this.ClassKind == MonoClassKind.GInst) | ||
| if (this.ClassKind is MonoClassKind.GInst or MonoClassKind.GParam) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't simply an offset change
| private TypeDefinition GetGeneric() | ||
| { | ||
| if (this.ClassKind != MonoClassKind.GInst) | ||
| if (this.ClassKind is MonoClassKind.GInst or MonoClassKind.GParam) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't simply an offset change
| case TypeCode.U4: | ||
| return sizeof(uint); | ||
|
|
||
| return 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be bound to offsets
This PR contains all the changes I made to make unity spy work on a game using Unity 2022.3.10.
I'm unsure how to create a complete new offset object and would need help with it (I commented the offsets I had to replace with the values I figured out).
There are also some non-offset changes, these probably need some work/testing to make them compatible with all other supported unity versions.