Open shalzuth opened 3 years ago
As I understand things, now that 0.4.15.3 has been released, all changes should be directed to the v0.5.x-wip branch.
One of the goals for v0.5 is generation of assemblies that are compatible with dot net 5. For example, Pass 24 has already been removed in eeaa230376d1ff8348ad11b682b61c51d87515e2
You can view more information about v0.5 in the documentation folder.
I’ll look at 0.5. Will keep this open in the meantime for discussion if that’s okay.
https://github.com/knah/Il2CppAssemblyUnhollower/blob/eeaa230376d1ff8348ad11b682b61c51d87515e2/UnhollowerBaseLib/ClassInjector.cs#L457 is also invalid .net (where mono doesn't care). I think we can remove it without any issue, and this looks like a bug anyway. If any method in an injected class returns a non-void value, it would return here instead of actually returning the result.
My GC was free'ing the TypeToClassDelegate from https://github.com/knah/Il2CppAssemblyUnhollower/blob/eeaa230376d1ff8348ad11b682b61c51d87515e2/UnhollowerBaseLib/ClassInjector.cs#L509 as well. This delegate should be alloc'd, or made static, correct? Doing so fixes my implementation. The other delegate hookedClassFromName
is static, so it doesn't get GC'd ever.
Edit - nvm, fixed here https://github.com/knah/Il2CppAssemblyUnhollower/blob/eeaa230376d1ff8348ad11b682b61c51d87515e2/UnhollowerBaseLib/ClassInjector.cs#L591
note - this also forces all types to not be sequential. need to filter better. this pr addresses https://github.com/knah/Il2CppAssemblyUnhollower/issues/44