sluaunreal icon indicating copy to clipboard operation
sluaunreal copied to clipboard

Use LuaOverrider instead of LuaBase to Hook UFunction.

Open zjhongxian opened this issue 4 years ago • 3 comments

全面使用新的Hook方案替代原理的LuaBase,进行蓝图函数的重写(新方式甚至支持重写Native UFunction函数)。

主要为了解决Hook生命周期缺陷,并且添加了不少新的特性。

zjhongxian avatar Sep 10 '20 08:09 zjhongxian

这个Commit里还有不少其他的优化,比如findProp、cacheEnumRef、SLuaLib::isValid等等。强烈建议楼主多分几个Commit提交,避免Commit内容与描述不一致,这样别人也会更容易理解一些。 这个Commit基本上根治了LuaBase的生命周期问题,楼主棒棒的~ 有个问题是这样改会动到UFunction的FunctionFlags,相当于破坏了UFunction在Hook前的状态,我个人感觉之前的那版在这点上更合理一些。

ShuraLiu avatar Feb 01 '21 14:02 ShuraLiu

FunctionFlags的改动应该是只对自定义新增的UFunction做的改造,不会影响到原有的UFunction。到现在为止我们还实现了 1、lua值复制 2、lua里面定义RPC Function等功能。

但是因为我这边的项目紧迫,没时间进行整理合并

zjhongxian avatar Jun 09 '21 09:06 zjhongxian

另:提交拆分了确实是比较好。。主要是我们这边时间有限,所以PR比较粗暴了。。 我们理想状态下是:这些commit之后,还有对应的demo代码、使用文档配对。

zjhongxian avatar Jun 09 '21 09:06 zjhongxian

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
6 out of 7 committers have signed the CLA.

:white_check_mark: crazytuzi
:white_check_mark: pangweiwei
:white_check_mark: zjhongxian
:white_check_mark: sgamerw
:white_check_mark: scriptkitz
:white_check_mark: eugenesujing
:x: liuxiaoyi


liuxiaoyi seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

tencent-adm avatar Apr 19 '23 03:04 tencent-adm

@ShuraLiu 目前slua 2.0版本已经推送到 https://github.com/zjhongxian/sluaunreal 待文档和用例补充后merge到主干

zjhongxian avatar Apr 21 '23 12:04 zjhongxian