Releases: Tencent/puerts
Unity_v1.4.1-pre.2,ApiLevel:19
中文版本请查看 doc/unity/zhcn/changelog.md
- fix: could not get any log in inspector with Node.js backend. #1201
- fix: if a error is thrown in ESM and the message contains line ends, the error message could be incorrect. #1188
- optimize: do not lock the mutex when destroying a JSFunction.
- feature: JsEnv.ClearModuleCache can clear ESM module cache now.
difference between Node.js/Quickjs/V8: wiki
Unreal_v1.0.3
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
Unity_v1.4.1-pre.0,ApiLevel:19
中文版本请查看 doc/unity/zhcn/changelog.md
- fix:when passing a JS number to C#
object
, the number would be cut to an Int. - 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
this is 1.4.0 release | 这是1.4正式版
[en] feature changed since 1.3
- support apple silicon #591
- upgrade the default v8 to 9.4,nodejs to 16
- full platform support for Node.js
- make all members become configurable #667
- add
require('puerts').getLastException
to get the Error instance #629 - support multi inspector client (including hot-reload).
- add
import.meta.url
when module is loading - Add
JsEnv.Backend
and add some GC API - add global variables
CS
andpuer
. migerating to ESM module. CommonJS will deprecated in the future. - add support for Android x86_64 (v8/quickjs)
- 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版本以来的功能变更
- 支持apple silicon芯片 #591
- 升级默认v8到9.4版本,Node.JS到16版本
- 支持安卓和iOS平台的Node.JS
- 所有属性改为configurable #667
- 添加
require('puerts').getLastException
接口 #629 - 支持同时连接多个inspector(包括热重载功能)
- 为模块添加
import.meta.url
- 添加
JsEnv.Backend
,提供了一些内存管理接口 - 添加全局变量
CS
以及puer
,向ESM规范过渡,CommonJS规范未来逐渐不建议使用 - 添加v8和quickjs的android x86_64支持
- 新增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
中文版本请查看 doc/unity/zhcn/changelog.md
- fix:ts error when some methods are returning Task without GenericType #1027
- fix:Nested class in Generic class will cause error in StaticWrapper #1030
- fix:illegal unity api access erro when creating JsEnv not in main thread#1049
- fix:
IsByRefLike
missing error in Unity2021.1 #1050 - feature:add support for Android x86_64 (v8/quickjs)
- feature:add
Puerts.IModuleChecker
. if yourILoader
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
中文版本请查看 doc/unity/zhcn/changelog.md
- support ambigious methods calling after generated staticwrapper. #1020
- fix a bug that after blittablecopy staticwrapper generated, passing two or more struct from C# to a JSFunction will get wrong JS arguments #1018
- fix Array Type arguments will cause error in staticwrapper #1015
- refactor the template of wrapper and get a little performance improvement report
- add missing '--jitless' flag for ios PuerTS with nodejs backend
- fix invalid meta in openupm package
difference between Node.js/Quickjs/V8: wiki
Unity_v1.3.9,ApiLevel:16
中文版本请查看 doc/unity/zhcn/changelog.md
- fix a bug that will throw 'undefined is not a xx' error when running multi jsenv parallel.
- fix the problem that circular dependency will cause crash when loading ESM
- fix the problem that ESM throws an error when loading dependency with relative path
- fix the problem that dts reports an error when generating nullable types
- add
import.meta.url
in es module js
difference between Node.js/Quickjs/V8: wiki
Unity_v1.4.0-rc.2,ApiLevel:18
中文版本请查看 doc/unity/zhcn/changelog.md
- full platform support for Node.js (i.e. Android and iOS support added). upm package now uses Node.js Backend by default.
- 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
andpuer
, corresponding to the originalrequire('csharp')
andrequire('puerts')
. Please change the using ofrequire
toglobal.CS
,global.puer
,import 'xxx'
. Therequire
in PuerTS will be considered to be removed in version 1.5. - Add
JsEnv.Backend
and add some GC API.LowMemoryNotification
has moved into it too. - refactor
NodeRunner
ExecuteModule
handling of multi-level dependencies fixed.- GeneralSetterManager/GeneralGetterManager optimization #688
- fix the bug that inspector break point +
setInterval
will cause crash #707 - support multiple inspectors connection for one single JsEnv,
hotreload
can also be used with inspector at the same time now #841 - remove
Node.js backend
's--no-browser-globals
- fix the problem that circular dependency will cause crash when loading ESM
- fix the problem that ESM throws error when loading dependency with relative path
- add
import.meta.url
when module is loading - fix the problem that dts reports an error when generating nullable types
difference between Node.js/Quickjs/V8: wiki
Unreal_v1.0.2
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版本