首页 > 其他分享 >UE5使用过程问题记录

UE5使用过程问题记录

时间:2022-12-12 17:44:57浏览次数:64  
标签:__ obj 记录 void project cpp error UE5 过程

一、 Action RPG编译报错

使用U5打开UE Demo Action RPG

Demo链接:https://www.unrealengine.com/marketplace/en-US/product/action-rpg-01

现象:

使用UE5打开此Demo时,在编译时,会提示找不到插件“SlateRemote”

解决方法:

可以直接打开ActionRPG.uproject,然后把“SlateRemote”的Enabled改成false,重新编译即可

二、启动UnrealEditor的报错

现象:

启动UnrealEditor的报错:

Plugin 'RuntimePhysXCooking' failed to load because module 'RuntimePhysXCooking' could not be found. Please ensure the plugin is properly installed, otherwise consider disabling the plugin for this project.

解决方法:

Engine\Binaries\Win64\UnrealEditor.modules里面,补充一下

"PhysXCooking": "UnrealEditor-PhysXCooking.dll",

怀疑是装rider的插件把这个文件搞坏了

三、UE编译时msado15.tlh报错

现象:

重新编译UE5时,报错:

1>[1/9] Touch msado15.tlh

1>[1/9]Touch msado15.tlh - Error but no output

解决方法:

参考:https://zenn.dev/shiena/scraps/19d01c0ad6af72

删掉这个目录:“Engine\Plugins\Runtime\Database\ADOSupport\Intermediate\Build\Win64\UnrealEditor\Development\ADOSupport”

四、UE编译成Game时,链接GLiveCodingEngineDir报错

现象:

1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "wchar_t * GInternalProjectName" (?GInternalProjectName@@3PA_WA)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "wchar_t const * const GForeignEngineDir" (?GForeignEngineDir@@3PEB_WEB)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "wchar_t const * const GLiveCodingEngineDir" (?GLiveCodingEngineDir@@3PEB_WEB)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "wchar_t const * const GLiveCodingProject" (?GLiveCodingProject@@3PEB_WEB)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "class FChunkedFixedUObjectArray * & GObjectArrayForDebugVisualizers" (?GObjectArrayForDebugVisualizers@@3AEAPEAVFChunkedFixedUObjectArray@@EA)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "void * __cdecl operator new(unsigned __int64)" (??2@YAPEAX_K@Z)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "void * __cdecl operator new(unsigned __int64,struct std::nothrow_t const &)" (??2@YAPEAX_KAEBUnothrow_t@std@@@Z)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPEAX@Z)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "void __cdecl operator delete(void *,struct std::nothrow_t const &)" (??3@YAXPEAXAEBUnothrow_t@std@@@Z)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "void __cdecl operator delete(void *,unsigned __int64)" (??3@YAXPEAX_K@Z)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "void __cdecl operator delete(void *,unsigned __int64,struct std::nothrow_t const &)" (??3@YAXPEAX_KAEBUnothrow_t@std@@@Z)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "void * __cdecl operator new[](unsigned __int64)" (??_U@YAPEAX_K@Z)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "void * __cdecl operator new[](unsigned __int64,struct std::nothrow_t const &)" (??_U@YAPEAX_KAEBUnothrow_t@std@@@Z)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "void __cdecl operator delete[](void *)" (??_V@YAXPEAX@Z)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "void __cdecl operator delete[](void *,struct std::nothrow_t const &)" (??_V@YAXPEAXAEBUnothrow_t@std@@@Z)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "void __cdecl operator delete[](void *,unsigned __int64)" (??_V@YAXPEAX_K@Z)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "void __cdecl operator delete[](void *,unsigned __int64,struct std::nothrow_t const &)" (??_V@YAXPEAX_KAEBUnothrow_t@std@@@Z)  Already in   project name .cpp.obj  In the definition of 
1>MultPlayerWAN_Test02.cpp.obj : error LNK2005: "unsigned char * * GNameBlocksDebug" (?GNameBlocksDebug@@3PEAPEAEEA)  Already in   project name .cpp.obj  In the definition of 

原因:

存在多个IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, Game, "Game" )

只允许存在一个,其它的要改成:

class FSomeModuleGameModule : public FDefaultGameModuleImpl
{
};

IMPLEMENT_GAME_MODULE(FSomeModuleGameModule, SomeModule);

参考来源:https://chowdera.com/2022/01/202201231614044113.html

五、UE编译成Game时,链接GIsGameAgnosticExe报错

现象:

error LNK2001: unresolved external symbol “bool GIsGameAgnosticExe” (?
Error 2 error LNK2001: unresolved external symbol “bool GIsGameAgnosticExe” (?
Error 3 error LNK2001: unresolved external symbol “wchar_t * GGameName” (?GGameName@@3PA_WA)

原因:

没有IMPLEMENT_PRIMARY_GAME_MODULE

解决方法:

把其中一个模块改成IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, Game, "Game" ) 其中Game自己命名。

参考来源:https://forums.unrealengine.com/t/cant-package-my-game/282046

六、UE启动时,提示游戏模块加载后,无法被成功初始化

现象:

The game module 'xxx' could not be successfully initialized after it was loaded.

原因:
没有给模块'xxx'添加相应的模块初始化文件,类似这个:

class xxx : public FDefaultGameModuleImpl

解决方法:
在模块的根目录下,添加相应的模块初始化文件即可

友情链接

blog: https://www.cgsgood.tech/ue_problem_record/
语雀: https://www.yuque.com/cgsgood/dshx0b/akm88q
简书blog:https://www.jianshu.com/p/36663b67a629
博客园:https://www.cnblogs.com/cgsgood/p/16976734.html

标签:__,obj,记录,void,project,cpp,error,UE5,过程
From: https://www.cnblogs.com/cgsgood/p/16976734.html

相关文章