[Bug]: IL2CPP 32-bit struct layouts are mismatched #3
Labels
area: unity
bug
Issue reports behavior which is not expected.
help wanted
Issue requires advanced knowledge.
low priority
Issue is of low priority.
What helper class does this issue occur on?
Unity
Description
32-bit versions of IL2CPP act somewhat special.
Games on Unity 2020.1 appear to load pre-2019 structs (
Il2CppClass
version which does not containunity_user_data
). However, thecctor_thread
field is decorated withALIGN_TYPE(8)
. It is likely a field of pointer-type size, but it must be 8-byte aligned, which causes alignment issues on 32-bit games.Since there aren't many 32-bit IL2CPP games, this issue is currently not of high priority.
Shown below is an example from the game "Granny 3" for the PC.
Reproduction Steps
Error Messages
Regression?
No response
Potential Causes and Fixes
The structs being outdated like that may go back to the version of the IL2CPP library, which the helper is able to infer. It may be possible to fix that issue through that.
The alignment issue cannot be fixed easily. It likely requires a new custom attribute in the structs which the
TypeParser
class will have to account for.The text was updated successfully, but these errors were encountered: