Skip to content

Releases: Tencent/puerts

Unity_v1.4.1-pre.2,ApiLevel:19

09 Feb 10:43
Compare
Choose a tag to compare
Pre-release

中文版本请查看 doc/unity/zhcn/changelog.md

  1. fix: could not get any log in inspector with Node.js backend. #1201
  2. fix: if a error is thrown in ESM and the message contains line ends, the error message could be incorrect. #1188
  3. optimize: do not lock the mutex when destroying a JSFunction.
  4. feature: JsEnv.ClearModuleCache can clear ESM module cache now.

difference between Node.js/Quickjs/V8: wiki

Unreal_v1.0.3

02 Feb 08:58
Compare
Choose a tag to compare

mac下如果遇到移入废纸篓问题,请

cd Plugins/Puerts/ThirdParty
find . -name "*.dylib" | xargs sudo xattr -r -d com.apple.quarantine 

新增特性

  • ue类型对应的js类型增加类型名称(编辑器全路径),以便于打印堆栈dump的时候分析

  • 静态绑定void*参数支持任意原生对象传入

  • 添加常用方法UDataTableFunctionLibrary::Generic_GetDataTableRowFromName的静态绑定

  • 手动删除蓝图,重启后自动生成

  • puerts::Object、puerts::Funcion加入对JsEnv的生命周期跟踪,降低使用的难度

  • cjs和mjs配合优化,支持package.json中通过"type": "module"指定为esm模块,支持在esm中加载.cjs(cjs模块)。

  • 添加Puerts.Gen FULL,蓝图全量生成功能

  • 默认生成所有struct的声明

  • 添加控制台命令(puerts ls,puerts compile)

  • 生成代码时,如果加载的蓝图GeneratedClass为空报错

  • nodejs版本下,优先调用nodejs的require,加载不成功再使用puerts的加载逻辑

  • 编辑器下,quickjs后端默认用dll版本,去掉该后端下不能在业务模块静态声明的问题

  • 增加运行时 JavaScript 路径配置

优化

  • 反射性能优化

  • 蓝图结构体都生成到ue_bp.d.ts

  • 优化大量代理蓝图以及ts代码的启动速度

变更

bug修复

  • 解决刚创建蓝图但未保存,生成d.ts的崩溃

  • mixin对输出值设置无效的问题

  • 解决带Out参数蓝图调用另一个重定向到ts的Out参数方法,ts中设置Out参数无效的问题

  • DefaultJSModuleLoader加载名字带点号的模块

  • react-umg声明,对于struct改为Partial来自动处理成可选字段,可以避免引用UE模块时产生的名字空间问题

  • 解决如果一个package含超过一个类型,只生成一个类型的bug

  • 解决ts继承BlueprintFunctionLibrary在Editor下只跑一次,打包后不跑的问题

  • 结构体两次Init的修正

  • FName大小写的问题导致函数为空的问题

  • json文件加载失败的问题

  • 解决继承链上有同名类导致的tid冲突

  • ue5生成声明忽略Engine.Transient包,解决ue5改包下类的.d.ts报错问题

  • 静态绑定和pesapi的int64、uint64参数,不传bigint都统一用默认值

Unity_v1.4.1-pre.1,ApiLevel:19

27 Jan 13:39
Compare
Choose a tag to compare
Pre-release

中文版本请查看 doc/unity/zhcn/changelog.md

  1. fix: did not filt obsoleted property setter/getter. #1152
  2. feature: add console.time. #1170
  3. feature: now you can use JSObject to store a JS function. #1143 #1144

difference between Node.js/Quickjs/V8: wiki

Unity_v1.4.1-pre.0,ApiLevel:19

23 Dec 10:19
Compare
Choose a tag to compare
Pre-release

中文版本请查看 doc/unity/zhcn/changelog.md

  1. fix:when passing a JS number to C# object, the number would be cut to an Int.
  2. feature: add PUERTS_DISABLE_SLOWBINDING. It will be useful in doing access control.

difference between Node.js/Quickjs/V8: wiki

Unity_v1.4.0,ApiLevel:19

24 Nov 07:25
Compare
Choose a tag to compare

this is 1.4.0 release | 这是1.4正式版

[en] feature changed since 1.3
  1. support apple silicon #591
  2. upgrade the default v8 to 9.4,nodejs to 16
  3. full platform support for Node.js
  4. make all members become configurable #667
  5. add require('puerts').getLastException to get the Error instance #629
  6. support multi inspector client (including hot-reload).
  7. add import.meta.url when module is loading
  8. Add JsEnv.Backend and add some GC API
  9. add global variables CS and puer. migerating to ESM module. CommonJS will deprecated in the future.
  10. add support for Android x86_64 (v8/quickjs)
  11. add Puerts.IModuleChecker. if your ILoader implement this interface. Then you can indicate which extname of jsfile will be treated as ESM Module.
[zhcn] 自1.3版本以来的功能变更
  1. 支持apple silicon芯片 #591
  2. 升级默认v8到9.4版本,Node.JS到16版本
  3. 支持安卓和iOS平台的Node.JS
  4. 所有属性改为configurable #667
  5. 添加require('puerts').getLastException接口 #629
  6. 支持同时连接多个inspector(包括热重载功能)
  7. 为模块添加import.meta.url
  8. 添加JsEnv.Backend,提供了一些内存管理接口
  9. 添加全局变量CS以及puer,向ESM规范过渡,CommonJS规范未来逐渐不建议使用
  10. 添加v8和quickjs的android x86_64支持
  11. 新增Puerts.IModuleChecker。传入的ILoader如果实现了该接口,则可以自定义哪些文件后缀会被识别为ESM模块
------

you can see other bugfixes log in doc/unity/en/changelog.md or doc/unity/zhcn/changelog.md

difference between Node.js/Quickjs/V8: wiki

Unity_v1.4.0-rc.7,ApiLevel:19

15 Nov 07:39
Compare
Choose a tag to compare
Pre-release

中文版本请查看 doc/unity/zhcn/changelog.md

  1. fix:ts error when some methods are returning Task without GenericType #1027
  2. fix:Nested class in Generic class will cause error in StaticWrapper #1030
  3. fix:illegal unity api access erro when creating JsEnv not in main thread#1049
  4. fix:IsByRefLike missing error in Unity2021.1 #1050
  5. feature:add support for Android x86_64 (v8/quickjs)
  6. feature:add Puerts.IModuleChecker. if your ILoader implement this interface. Then you can indicate which extname of jsfile will be treated as ESM Module.

difference between Node.js/Quickjs/V8: wiki

Unity_v1.4.0-rc.6,ApiLevel:19

20 Oct 10:03
Compare
Choose a tag to compare
Pre-release

中文版本请查看 doc/unity/zhcn/changelog.md

  1. support ambigious methods calling after generated staticwrapper. #1020
  2. fix a bug that after blittablecopy staticwrapper generated, passing two or more struct from C# to a JSFunction will get wrong JS arguments #1018
  3. fix Array Type arguments will cause error in staticwrapper #1015
  4. refactor the template of wrapper and get a little performance improvement report
  5. add missing '--jitless' flag for ios PuerTS with nodejs backend
  6. fix invalid meta in openupm package

difference between Node.js/Quickjs/V8: wiki

Unity_v1.3.9,ApiLevel:16

30 Sep 08:38
Compare
Choose a tag to compare

中文版本请查看 doc/unity/zhcn/changelog.md

  1. fix a bug that will throw 'undefined is not a xx' error when running multi jsenv parallel.
  2. fix the problem that circular dependency will cause crash when loading ESM
  3. fix the problem that ESM throws an error when loading dependency with relative path
  4. fix the problem that dts reports an error when generating nullable types
  5. add import.meta.url in es module js

difference between Node.js/Quickjs/V8: wiki

Unity_v1.4.0-rc.2,ApiLevel:18

28 Sep 13:53
Compare
Choose a tag to compare
Pre-release

中文版本请查看 doc/unity/zhcn/changelog.md

  1. full platform support for Node.js (i.e. Android and iOS support added). upm package now uses Node.js Backend by default.
  2. In order to make the Node.js function more convenient to use, and also to solve the problem of WebGL version in WeChat mini-game, from this version on, add global variables CS and puer, corresponding to the original require('csharp') and require('puerts'). Please change the using of require to global.CS, global.puer, import 'xxx'. The require in PuerTS will be considered to be removed in version 1.5.
  3. Add JsEnv.Backend and add some GC API. LowMemoryNotification has moved into it too.
  4. refactor NodeRunner
  5. ExecuteModule handling of multi-level dependencies fixed.
  6. GeneralSetterManager/GeneralGetterManager optimization #688
  7. fix the bug that inspector break point + setInterval will cause crash #707
  8. support multiple inspectors connection for one single JsEnv, hotreload can also be used with inspector at the same time now #841
  9. remove Node.js backend's --no-browser-globals
  10. fix the problem that circular dependency will cause crash when loading ESM
  11. fix the problem that ESM throws error when loading dependency with relative path
  12. add import.meta.url when module is loading
  13. fix the problem that dts reports an error when generating nullable types

difference between Node.js/Quickjs/V8: wiki

Unreal_v1.0.2

08 Sep 04:42
Compare
Choose a tag to compare

mac下如果遇到移入废纸篓问题,请

cd Plugins/Puerts/ThirdParty
find . -name "*.dylib" | xargs sudo xattr -r -d com.apple.quarantine 

新增特性

  • 手机nodejs后端支持

  • 静态绑定支持bound array( 例如:int ba[10])字段,支持void *

  • 静态绑定支持仅声明无定义类的注册

  • 静态绑定支持“重载+默认参数”

  • 静态绑定增加对script type的const T*的支持

  • const char*支持通过ArrayBuffer传递

  • 自创建的JsEnv也能支持代码热刷新

  • 支持std::function的函数签名声明生成

  • 静态绑定添加ExtensionMethod(类似C#)的支持

  • 静态绑定添加TSharedPtr的支持

  • nodejs版本支持代码热刷新

  • 静态绑定支持运行时获取typeid

优化

  • 编辑器下虚拟机重置时,大量对象需要加载js脚本而导致启动速度慢的问题

  • 通过对BackingStore封装,支持编辑器下的结构体gc优化

  • JsEnv.Start统一改为通过require来加载,让初始脚本和其它脚本一致(debug、热刷新等)

  • 增量生成蓝图的ue.d.ts声明,解决业务连带资源过多,导致生成太慢的问题

变更

bug修复

  • 解决开启ThreadSafe选项后,由ts触发ue gc可能会导致死锁的问题

  • 解决将std map替换成tmap后( b823ab9 ),tmap可能会因为插入操作而导致外部查找结果失效的问题

  • 解决release编译,由于同签名函数的CFunctionInfoImpl合并成一个导致生成d.ts的默认值个数不对的问题

  • 修复符合继承类格式,但是继承的不是UE类型而是ts原生类型时导致的报错

  • 稳定性增强,对FV8Utils::GetUObject返回的对象增加无效指针判断

  • previewworld下找不到jsobject的报错

  • 解决UE静态绑定使用了cpp模块里头的类型作为字段,ue.d.ts报错的问题

  • 静态绑定的静态属性生成ue.d.ts时崩溃的问题

  • SignatureFunction所在内存被重用,导致FFunctionTranslator访问无效UFunction导致崩溃

  • 修复DynamicInvoker被多线程访问导致的问题

  • 解决容器(或者其它非POD UStruct)引用参数用$ref(undefined)传递时、内存泄漏的问题

  • 解压容器反射因为字节对齐问题导致的崩溃

  • 解决mixin特性在非运行状态使用,如果编辑器触发保存会触发蓝图非法断言的问题

安装包使用说明

  • puerts_v8.tgz: v8版本,适用于ue4.25及以上版本

  • puerts_v8_for_ue424_or_below.tgz,v8版本,适用于ue4.24及以下版本

  • puerts_nodejs.tgz:nodejs版本

  • puerts_quickjs.tgz:quickjs版本