BepInEx / Il2CppInterop

A tool interoperate between CoreCLR and Il2Cpp at runtime
GNU Lesser General Public License v3.0
185 stars 59 forks source link

Implemented TypeComparer For GetOrCreateProperty When There Are More … #91

Closed krulci closed 1 year ago

krulci commented 1 year ago

This pull request implemented a TypeComparer for Pass80UnstripMethods::GetOrCreateProperty() to resolve the error of Sequence contains more than one matching element. The original logic only compares the property name and parameters count. There are cases where two properties of the same name and the same number of parameters count, but differ between the parameter type. Such as in the case of the below screenshot:

{UnityEngine.AnimationClip.UnityEngine.AnimatorOverrideController::Item(System.String)}
{UnityEngine.AnimationClip.UnityEngine.AnimatorOverrideController::Item(UnityEngine.AnimationClip)}

image