Skip to content

Ensure Proper Layout for Non-ValueTypes#57

Merged
ghorsington merged 1 commit intomasterfrom
fix-layout-unstripping
Dec 11, 2022
Merged

Ensure Proper Layout for Non-ValueTypes#57
ghorsington merged 1 commit intomasterfrom
fix-layout-unstripping

Conversation

@Kasuromi
Copy link
Copy Markdown
Member

On some Unity versions, some types will have layout attributes assigned to them even though they are not of ValueType.

A prime example is UnityEngine.LightProbes inside UnityEngine.CoreModule.dll on 2018.4.36f1 (TestGame).

This went unnoticed for a while until we switched to CoreCLR which is way stricter in terms of type loading.

@ghorsington
Copy link
Copy Markdown
Contributor

Looks OK to me in terms of code. Was this tested yet on some other games than just TestGame?

@Kasuromi
Copy link
Copy Markdown
Member Author

Kasuromi commented Dec 9, 2022

Looks OK to me in terms of code. Was this tested yet on some other games than just TestGame?

Yes,
Worked without issue on GTFO (Unity 2019.4.21f1 Win64) and Gunfire Reborn (Unity 2018.4.36f1 Win64)

I haven't tried any Win32 games, but I think it's safe to assume it will work there as well.

@ghorsington ghorsington merged commit d76d246 into master Dec 11, 2022
@ds5678 ds5678 deleted the fix-layout-unstripping branch September 9, 2024 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants