knah/Il2CppAssemblyUnhollower

Unstripped methods with casts to array types fail at runtime

knah opened this issue · 0 comments

knah commented
[14:57:07.459] [MelonLoader] [MyMod] [Error] System.ArgumentException: UnhollowerBaseLib.Il2CppReferenceArray`1[UnityEngine.Component] is not al Il2Cpp reference type
  at UnhollowerBaseLib.Il2CppObjectBase.TryCast[T] () [0x0002a] in <56ec66a01d45498298ce9793c60195c6>:0
  at UnhollowerBaseLib.Il2CppObjectBase.Cast[T] () [0x00001] in <56ec66a01d45498298ce9793c60195c6>:0
  at UnityEngine.GameObject.GetComponents (Il2CppSystem.Type type) [0x0000d] in <e55c8968e207437b8f754f5fff33d365>:0

Workaround: try using a different version (such as generic/non-generic one), or recreated the problematic method via base icalls they use.