InjectFix
InjectFix copied to clipboard
InjectFix is a hot-fix solution library for Unity
或者有什么方法可以比较简单的绕过不能新增Enum的问题?
使用新版的(上个月底更新的)InjectFix在生成补丁时发现,当尝试修复包含元组的方法时,在生成补丁的过程中报异常,如果把元组换成新增定义的class替换时,就可以通过了,但曾经的旧版本(大概是去年下半年这样)是可以正常生成包含元组的方法的补丁的。 异常报错大致如下: Unhandled Exception:System.InvalidProgramException: try to use a generic type definition: !0 at IFix.CodeTranslator.addExternType (Mono.Cecil.TypeReference type, Mono.Cecil.TypeReference contextType) [0x00121] in E:\Code\InjectFix-master (3)\InjectFix-master\Source\VSProj\Src\Tools\CodeTranslator.cs:196 at IFix.CodeTranslator.Serialize (System.IO.Stream output) [0x00067] in E:\Code\InjectFix-master (3)\InjectFix-master\Source\VSProj\Src\Tools\CodeTranslator.cs:3847...
修改C#代码 加入[IFix.Patch],,热更新,热更新后所有操作都变卡了,,不光是涉及到修改部分的页面,,其他页面也会变的很卡,不知道是否和哪些SDK会有冲突?MAC和WIN的区别在接入的SDK不一样
unity版本:2018.4.32f1 之前使用的是这个版本 [6756f1de3349986191b780769db04b2f215f6029](https://github.com/Tencent/InjectFix/commit/6756f1de3349986191b780769db04b2f215f6029) Inject的时候会正常输出  现在使用最新版的ifix,在执行Inject会多输出几行,大概是 ``` at IFix.CodeTranslator.getMethodId (Mono.Cecil.MethodReference callee, Mono.Cecil.MethodDefinition caller, System.Boolean isCallvirt, System.Boolean directCallVirtual, IFix.CodeTranslator+InjectType callerInjectType) [0x01217] in D:\Dev\StarRepo\InjectFix\Source\VSProj\Src\Tools\CodeTranslator.cs:1623 UnityEngine.Debug:Log(Object) IFix.Editor.IFixEditor:CallIFix(List`1) (at Assets/IFix/Editor/ILFixEditor.cs:136) IFix.Editor.IFixEditor:InjectAssembly(String) (at Assets/IFix/Editor/ILFixEditor.cs:305) IFix.Editor.IFixEditor:InjectAllAssemblys()...
我使用IFix.Interpret 标签新增了一个函数,用于在委托绑定,但真机上,注册时会报错,错误如下: InvalidProgramException: no closure wrapper for System.Action`2[System.Boolean,System.Int32] at IFix.Core.VirtualMachine.Execute (IFix.Core.Instruction* pc, IFix.Core.Value* argumentBase, System.Object[] managedStack, IFix.Core.Value* evaluationStackBase, System.Int32 argsCount, System.Int32 methodIndex, System.Int32 refCount, IFix.Core.Value** topWriteBack) [0x00000] in :0 at...
android手机上加载补丁得时候提示如下: assembly may be not injected yet, cat find IFix.ILFixInterfaceBridge, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Unity版本:Unity2018.4.19f1, IL2CPP打得Android包 build_for_unity.bat已经用当前版本重新生成了IFixToolKit和IFix.Core.dll Editor下是没事得。
我们项目接入InjectFix之后,在自动化打包脚本里面打出来的包C#层级报错和LogError都没有相关的栈,比如下面这个样子: 2021/7/1 17:37:11 CollisionMeshData couldn't be created because the mesh has been marked as non-accessible. Mesh asset path "" Mesh name "dj_stone07_07" 2021/7/1 17:40:15 LuaException: [string "chunk"]:4: ')' expected near...
对override void OnDestroy()打补丁,base.OnDestroy会调用到自身的OnDestroy,报StackOverflowException protected override void OnDestroy() { base.OnDestroy(); ... }
注入代码对il2cpp的影响: | | libil2cpp.so大小(MB) | 编译耗时(S) | | ------------ | ---------------- | -------- | | 无注入 | 56.7 | 330 | | InjectFix | 60.3 | 617 | | LuaInjection...