InjectFix
InjectFix copied to clipboard
InjectFix is a hot-fix solution library for Unity
NullReferenceException: Object reference not set to an instance of an object. 0 NullReferenceException: Object reference not set to an instance of an object.System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[]...
我看unity2018的最新版本已经不再产生mdb文件了,生成pdb文件 读取符号那块感觉应该改成这样 assembly = AssemblyDefinition.ReadAssembly(assmeblyPath, new ReaderParameters { ReadSymbols = true , SymbolReaderProvider = new PortablePdbReaderProvider() }); 但是目前的Mono.Cecil 似乎没有这个方法 现在会有个警告"Warning: read " + assmeblyPath + " with symbol fail" 导致运行起来有点问题
最好有个showcase,这样推广效果应该会更好点
一个函数这样写没有问题 private int Cal(int a, int b) { //int[] temp = new int[] { 1,2,3}; return a + b;// + temp[0]; } 这样写就会报Warning: not support il[IL_0008: ldtoken /_ private int...
一、使用的master版本 Commits on Sep 22, 2020 解决补丁函数里通过base调用父类函数报错问题 (#231) @annayxguo annayxguo committed 6 days ago 二、类似的问题 async await 报错 #222 https://github.com/Tencent/InjectFix/issues/222 三、出现的步骤及环境 1、Unity Version 2019.3.7f1 (6437fd74d35d)。 2、修复异步函数 [IFix.Patch] async void Function(){...}。...
在测试使用示例时,我发现CustomBridge并不能达到预期的效果。下面是NewClassTest的修改: ``` //#define TEST using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using IFix.Core; using System.IO; //1、执行菜单“InjectFix/Fix”生成补丁; //2、注释“NewBehaviourScript”,“SubSystem2”两个类,以及NewClassTest的Init函数里头new SubSystem2的那行语句; //3、执行菜单“InjectFix/Inject”,模拟线上没有“NewBehaviourScript”,“SubSystem2”的版本; //4、NewClassTest.cs拖到场景,运行看下效果,此时只加载SubSystem1; //5、把生成的补丁拷贝到Resources下,再次运行看下效果; public interface IMonoBehaviour { void Start();//简单demo,只定义了Start方法,实际Awake,Update,OnDestroy。。。都类似 void Update();...
新加属性问题
车总请教个问题, 我看说明里是可以新加属性得,但是我 public int TestA { [IFix.Interpret] get; [IFix.Interpret] set; } 或者 [IFix.Interpret] public int TestA{get;set;} 都是不行的,加载补丁会提示can not load field
会报这个错: ExecutionEngineException: Attempting to call method 'System.Threading.Interlocked::CompareExchange' for which no ahead of time (AOT) code was generated.