找回密码
 立即注册
查看: 336|回复: 12

创建 Unreal Project with AirSim Blocks Environment

[复制链接]
发表于 2022-12-14 16:26 | 显示全部楼层 |阅读模式
上一篇文章(链接如下)介绍了如何在Windows10 系统下安装AirSim的大概流程以及我在安装过程中遇到的一个坑。

这一篇文章来进一步记录一下如何构建Unreal project.
第一步:setting up Unreal Environment
官方指导链接:
这里我选择option1: Built-in Blocks Environment
具体步骤就是:
1)利用Developer Command Prompt for 2019 的terminal 将文件夹地址转成 AirSim\Unreal\Environments\Blocks,比如以我安装的地址为例:cd C:\Program Files (x86)\AirSim\Unreal\Environments\Blocks;
2)输入 update_from_git.bat
Bug 1: 第一次输入 update_from_git.bat 遇到如下错误。
Get-ItemProperty : Cannot find path 'HKEY_CLASSES_ROOT\Unreal.ProjectFile\shell\rungenproj' because it does not exist.
网络上指导(https://github.com/microsoft/AirSim/issues/1219#issuecomment-533849033)说是要先将Epic Games launcher 退出,然后重新打开Epic launcher, 然后会自动跳出 fix of associate project 的选项,确认之后,再输入(2)指令,就不在有错误提示了。
Bug 2: 无法编译
Could not find NetFxSDK install dir; this will prevent SwarmInterface from installing. Install a version of .NET Framework SDK at 4.6.0 or higher.
Modify VisualStudio2019 如下图:



(3) 如果步骤 update_from_git.bat 正常编译,当前文件路径会生成Blocks.sln 文件.。双击此file,然后VS2019 将打开它。
Bug 3: VS2019 debug状态栏 选项中没有DebugGame_Editor (Blocks.sln 只有2k, 打开里面是没有DebugGame Editor|Win64 = DebugGame Editor|Win64类似的代码)
Solution:重新安装VS2019
Bug 4:UE4 load failed
Solution: 将当前目录下 .vs folder 删除, 然后terminal 输入clean.bat, 再重新输入 update_from_git.bat.  


(4) VS打开Blocks.sln后确认build configuration 是DebugGame_Editor和Win64, 如下图,然后按F5 键。


完成!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
发表于 2022-12-14 16:26 | 显示全部楼层
问题成功解决了,就是EGames未关联的原因,衷心感谢答主
发表于 2022-12-14 16:31 | 显示全部楼层
有用的[赞同]
发表于 2022-12-14 16:40 | 显示全部楼层
您好 我用VS2022 在最后第四步F5之后运行失败,怎么解决?
发表于 2022-12-14 16:44 | 显示全部楼层
我也是,提示“common_utils::Utils::isDefinitelyLessThan”: 未找到匹配的重载函数,您解决了吗
发表于 2022-12-14 16:44 | 显示全部楼层
是不是Unreal选择的是5以上?
发表于 2022-12-14 16:54 | 显示全部楼层
VS2022 和UE 5.03 出现

错误        C2672        “common_utils::Utils::isDefinitelyLessThan”: 未找到匹配的重载函数;

错误        C2027        使用了未定义类型“physx::PxVehicleDrive”;

错误        C2027        使用了未定义类型“physx::PxVehicleWheels”;

错误        MSB3073        命令“D:\UE5\UE_5.0\Engine\Build\BatchFiles\Build.bat BlocksEditor Win64 DebugGame-Project="D:\AirSim\Unreal\Environments\Blocks\Blocks.uproject" -WaitMutex -FromMsBuild”已退出,代码为 6。       

等错误,楼主知道怎么解决么?我看github的提问区也有人问相同的问题,并且还未解决。[爱][爱][爱]
发表于 2022-12-14 16:54 | 显示全部楼层
可能就是不能用UE大于5的版本
发表于 2022-12-14 16:59 | 显示全部楼层
谢谢哥,经昨天实测,确实是AIRSIM 不支持UE5.03.虽然官网上说支持,但是不知道为啥我会出现上述错误。昨天换了UE4.27后,该问题消失。
发表于 2022-12-14 17:04 | 显示全部楼层
编译前无法找到UE4.exe如何解决啊
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-6-27 07:51 , Processed in 0.114897 second(s), 26 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表