Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upHotfixInject不能热更新C#代码 #752
Comments
|
Android, Unity 2018.4.23f1的版本。 |
|
可能是注入后又触发了重新编译吧 |
|
开始BuildPipeline.BuildPlayer之后还会再触发编译么? |
|
我也遇到了这个问题,inject成功后打出来的安卓包和pc包里Assembly-CSharp.dll都没有注入信息,不能热更。编辑器模式可以热更。unity版本是2019.3.3f1. |
|
我也是这样问题, 有兄弟找到原因没。要怎么解决。版本是2019.2.21f1 |
更新到master版本 |
ok 解决了 |
|
@chexiongsheng 遇到相同的问题,已经使用2.1.15 , 版本:Unity 2019.4.0f1 LTS |
应该是新版本打包机制有所修改
|
可能和我漏提交东西有关,我已经更新了下载包,你重新下载看看 |
谢谢,更新后已修复 |
|
@chexiongsheng 我还是遇到这样的问题,在编辑器模式可以热更,但是打包PC版本出来后就没有作用 |
同样的现象,不一定是同样的问题。这个issues提到的bug已经被解决而且也被验证。你还注入不成功,应该是其它原因导致的,比如操作步骤有误,打包脚本在注入后触发了重新编译等等。 |
|
你打包的过程,是否有“hotfix inject finish!”或者“had injected!”的打印呢?没有的话就是没触发注入。文档:https://github.com/Tencent/xLua/blob/master/Assets/XLua/Doc/hotfix.md |
您好,大大。我确认了这是在build之后输出 |
你是不是下载错版本了?你下载的是release里头的source code?那个是有问题的 |
我是直接在首页下的,下的是xLua-master |
太早下了么,刚发2.1.15的时候,master是有问题的,你现在重新下载看看 |
已重下,新建了新工程,但结果还是一样,build后打印的inject路径并没有跟随到我打包的路径,还是到原工程的路径 |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

在BuildPipeline.BuildPlayer 的前一步调用了Hotfix.HotfixInject();日志也显示Inject成功了。但是打出来的包就是不能更新C#代码。在编辑器上测试就没有问题。