Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hotfix] 有时需要放到非Editor目录才生效 #1115

Open
jerry-zeng opened this issue Jan 25, 2024 · 0 comments
Open

[Hotfix] 有时需要放到非Editor目录才生效 #1115

jerry-zeng opened this issue Jan 25, 2024 · 0 comments

Comments

@jerry-zeng
Copy link

方式二的配置方式,静态类静态属性加[Hotfix],放在Editor目录,Unity2018.4运行挺正常的,文档里也写了高版本Unity需要放Editor目录。

现在升级到Unity2021.3 + xlua2.1.16,同样的代码,再放Editor目录就HotfixInject无效(编辑器和安卓都一样),显示"had injected!",dll的md5也确实变了,但是实际还是提示no field _Hotfix0。手头没现成的dll反编译工具,所以看不到dll变化纠结了一整天,无意中看到有人说放在非Editor目录可以,试了下确实可以。

我用XLua/Examples跑也正常,那里是放Editor目录的。

具体原因未知,跟XLua.Core.dll有关系呢?还是Unity版本有关系? 总之,配置脚本可能不一定非要放Editor目录。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant