puerts icon indicating copy to clipboard operation
puerts copied to clipboard

是否能支持C#拓展方法

Open dong52008 opened this issue 6 years ago • 4 comments

未来是否能通过优化生成index.d.ts来支持C#的拓展方法。Unity中DOTween和一些自己写的拓展方法,目前不好调用。

dong52008 avatar Sep 09 '20 01:09 dong52008

考虑下要怎么支持

chexiongsheng avatar Sep 09 '20 12:09 chexiongsheng

JS 中建议使用 tween.js 减少跨语言调用 https://github.com/tweenjs/tween.js

Geequlim avatar Sep 09 '20 13:09 Geequlim

其实也不是不能支持, 但是得实现生成器规则, 需要检索所有Assembly里面的静态类, 然后检查第一个参数, 再绑定到类里面, 因为C#里面是能执行的, 至于这个生成器谁去写, 什么时候才能看到写好的就不好说了

------------------ 原始邮件 ------------------ 发件人: "Tencent/puerts" <[email protected]>; 发送时间: 2020年10月22日(星期四) 下午4:15 收件人: "Tencent/puerts"<[email protected]>; 抄送: "Subscribed"<[email protected]>; 主题: Re: [Tencent/puerts] 是否能支持C#拓展方法 (#30)

Closed #30.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

PleijaNet avatar Oct 22 '20 08:10 PleijaNet

其实也不是不能支持, 但是得实现生成器规则, 需要检索所有Assembly里面的静态类, 然后检查第一个参数, 再绑定到类里面, 因为C#里面是能执行的, 至于这个生成器谁去写, 什么时候才能看到写好的就不好说了 … ------------------ 原始邮件 ------------------ 发件人: "Tencent/puerts" <[email protected]>; 发送时间: 2020年10月22日(星期四) 下午4:15 收件人: "Tencent/puerts"<[email protected]>; 抄送: "Subscribed"<[email protected]>; 主题: Re: [Tencent/puerts] 是否能支持C#拓展方法 (#30) Closed #30. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

已经支持了啊,看demo,有示例

chexiongsheng avatar Oct 22 '20 08:10 chexiongsheng