puerts icon indicating copy to clipboard operation
puerts copied to clipboard

[UE] 运行时js的函数名与c++对象定义的函数名大小写不一致

Open lzj10 opened this issue 2 years ago • 1 comments

context | 编译/运行环境

windows平台打包exe,使用v8

how to reproduce | 复现步骤

有一个static的函数定义 Npc,生成的ue.d.ts没问题也是Npc,但是运行时js的方法名是大写的NPC,感觉像是FName导致的问题,但是没找到具体的产生原因 image

lzj10 avatar Aug 29 '22 08:08 lzj10

FAQ有描述原因,之前处理过字段。 函数应该也可以类似的处理方式。 原因:https://github.com/Tencent/puerts/blob/master/doc/unreal/zhcn/faq.md#%E6%89%93%E5%8C%85%E5%90%8E%E8%BF%90%E8%A1%8C%E6%97%B6%E6%8A%A5%E4%B8%80%E4%BA%9B%E5%AD%97%E6%AE%B5%E6%89%BE%E4%B8%8D%E5%88%B0 字段的处理:https://github.com/Tencent/puerts/blob/master/unreal/Puerts/Source/JsEnv/Private/StructWrapper.cpp#L254

你可以先尝试改改?

chexiongsheng avatar Aug 29 '22 09:08 chexiongsheng