zombieyang / puerts_unity_webgl_demo

在Unity里用Typescript写小游戏/Web游戏
BSD 3-Clause "New" or "Revised" License
190 stars 68 forks source link

在js测给Func<object>返回一个结构体,能复现出GetTypeIdFromResult产生的bug #26

Closed zgz682000 closed 2 years ago

zgz682000 commented 2 years ago

由于返回值类型是object,所以走了DataTranslate中的AnyTranslator,进而调用了getValueApi.GetTypeId -> PuertsDLL.GetTypeIdFromResult -> getFromJSReturn.ts中的GetTypeIdFromResult

getFromJSReturn.ts中的GetTypeIdFromResult 目前的实现并没有返回对象的类型id,而是返回32。所以引起报错。

image

zombieyang commented 2 years ago

感谢贡献