InjectFix icon indicating copy to clipboard operation
InjectFix copied to clipboard

InjectFix is a hot-fix solution library for Unity

Results 142 InjectFix issues
Sort by recently updated
recently updated
newest added

项目使用zeus打包流程,在before Build阶段生成对应平台的patch文件,在OnPostBuildPlayerScriptDLLs回调的时候执行注入,实践发现对于Assembly_CSharp程序集,Android和IOS手机包都能正常生成patch文件,但对于Packages下的asmdef对应的程序集,在打Android包的时候生成patch文件失败,通过log显示发现是在收集patch方法的时候,收集到的方法数量为0,所以没有生成patch文件。后续在打包机打包之后工程的ScriptAssemblies里反编译对应的dll发现,本应该打上了IFix.Patch标签的方法回到了初始没有标签的状态。求问这个情况是因为什么?应该怎么解决?

Exception: assembly may be not injected yet, cat find IFix.ILFixInterfaceBridge, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null at IFix.Core.PatchManager.Load (System.IO.Stream stream, System.Boolean checkNew) [0x00000] in :0 PC没问题。想知道为什么。。。

Reason: https://github.com/Tencent/InjectFix/blob/552da3654e74c4b08bbe2533699fb2306df5de7e/Source/VSProj/Src/Core/StackOperation.cs#L256-L260 Known issue, but never fixed😅 Test case: ``` csharp public struct TestStruct { public int a; public string b; } [Patch] public void TestOutStruct(out TestStruct ts) { ts.a...

当我对 Action 类型变量绑定一个新的回调时提示报错,Action 类属于Assembly-CSharp-firstpass,新增的回调属于Assembly-CSharp,我应该如何处理

哥,InjectFix会导致代码内存增加一些,相应的性能也有些损耗。在项目中C#代码较多:1.各种package,2.第三方插件,3.游戏逻辑代码,4.XluaWarp文件。哪些建议热更?

nullable的值直接进行比较的时候,会将取值函数更改为GetValueOrDefault,injectfix就会报错

ExecutionEngineException: Attempting to call method 'Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder::AwaitUnsafeOnCompleted' for which no ahead of time (AOT) code was generated. at IFix.Core.ReflectionMethodInvoker.Invoke (IFix.Core.VirtualMachine virtualMachine, IFix.Core.Call& call, System.Boolean isInstantiate) [0x00000] in :0 at IFix.Core.VirtualMachine.Execute (IFix.Core.Instruction*...

This will fix #400 . You will most likely encounter such an error if your project is using both `Task` and `UniTask`. This PR gets it fixed. > ExecutionEngineException: Attempting ...

``` [IFix.Patch] public async void OnBtnStart() { Debug.Log("---111---"); m_VersionText.text = 1.ToString(); if (m_Started) { return; } Debug.Log("---2222---"); await Task.Delay(3000); m_VersionText.text = 2.ToString(); Debug.Log("---333---"); ``` Output: 11-25 17:25:33.413 2475 2491 I...

``` public class TestPatch : MonoBehaviour { private void Update() { if (Input.GetKeyDown(KeyCode.Space)) { CallOneAsync("hello"); } } [Patch] public async void CallOneAsync(string name) { Debug.Log(name); await Task.Delay(1000); Debug.Log("TestTask"); } }...