Il2CppInterop icon indicating copy to clipboard operation
Il2CppInterop copied to clipboard

Fix issue finding GetFieldDefaultValue on 2021.3.23

Open limoka opened this issue 2 years ago • 4 comments

This PR fixes an issue where Class::GetDefaultFieldValue() is not found by signature and traversal search returns wrong value because of compiler optimization. Added a check for such optimization and added the signature from the game where issue occured. Tested on Idle Slayer Unity 2021.3.23 and Core Keeper Unity 2021.3.14

limoka avatar May 07 '23 17:05 limoka

@limoka can you rebase?

ds5678 avatar Dec 13 '24 23:12 ds5678

@ds5678 rebased as you asked. Sorry it took a while, I was busy with IRL things.

limoka avatar Jan 16 '25 18:01 limoka

@ds5678 addressed your comments. You can have a look at why these changes were made in these Discord messages. https://discord.com/channels/623153565053222947/623153565661265952/1104817110888235018

This message in particular shows exactly the situation in which this check is triggered.

A correct match should not contain more than 4 jumps, at least on metadata version 30 and below (IDK about further versions, this needs more testing)

limoka avatar Jan 18 '25 14:01 limoka

It looks fine to me, but I probably won't merge it without @js6pak giving it a look too. Runtime changes aren't really my area of expertise.

ds5678 avatar Feb 14 '25 07:02 ds5678