puerts icon indicating copy to clipboard operation
puerts copied to clipboard

在UMG蓝图编辑界面直接挂接TypeScript脚本

Open fonlylovey opened this issue 2 years ago • 5 comments

在编辑器中新建蓝图类并且从UTSUserWidget 派生,,然后在TypeScript新建umg的ts业务逻辑类从UE.TSWidgetPrivate派生 即可在编辑器中旋转这个ts业务类,而直接属性umg界面的业务逻辑

fonlylovey avatar Jul 08 '22 08:07 fonlylovey

image

fonlylovey avatar Jul 08 '22 08:07 fonlylovey

SetupUI是必须实现的

fonlylovey avatar Jul 08 '22 08:07 fonlylovey

我看了下,这PR是不需要修改现有代码的,直接做成一个第三方扩展不是更好些么? 换位思考下,你会接受你更新个puerts新版本,加了很多你用不上的功能么?

像nodejs生态,能力扩展是通过一个个第三方的npm来实现的,难以想象如果世界上所有npm包都合入到nodejs代码会是个什么景象。

你做成扩展库,如果大家用得好,也可以在puerts那加个优秀组件的链接。

chexiongsheng avatar Jul 08 '22 08:07 chexiongsheng

我的想法是只能放核心代码的才会往里放。 现有的我都在考虑有没哪些模块、代码可以拆到别的repo了。

chexiongsheng avatar Jul 08 '22 08:07 chexiongsheng

恩,可以放到你那个demo的仓库里面

fonlylovey avatar Jul 11 '22 01:07 fonlylovey