Tencent / sluaunreal

lua dev plugin for unreal engine 4 or 5
Other
1.78k stars 422 forks source link

反馈一个运行“Mobile Preview ES2 (PIE)”时出现的报错 #86

Closed GotGimhong closed 5 years ago

GotGimhong commented 5 years ago

您好,截图里是SluaLib.cpp文件loadUI函数中的一段代码,这段代码会根据编译时环境转换对应的UEngine指针。PIE模式都是走WITH_EDITOR的分支,但是经过测试,在Mobile Preview ES2模式下,GEngine只能转换成UGameEngine类型,而不能转换成UUnrealEdEngine类型,所以运行Mobile Preview ES2时就会有“gameinstance missing”的报错,相关的逻辑也无法执行。

要解决这个问题需要将Mobile Preview ES2从WITH_EDITOR中区分出来,不知道您有没有比较好的解决方法。

捕获

pangweiwei commented 5 years ago

你pull一下新版,新版你可以自己传入world参数,你自己管理owner,不依赖gameengine

GotGimhong commented 5 years ago

你pull一下新版,新版你可以自己传入world参数,你自己管理owner,不依赖gameengine

好的,问题解决了,感谢。