使用vscode开发UE5.3
参考链接:
1. 配置UE5.3
使用UE5.3打开任意项目,然后在编辑器中点击编辑->编辑器偏好设置->源代码,将源代码编辑器设置为Visual Studio Code。
配置好后重启UE,然后新创建的项目将会使用vscode作为源代码编辑器,并且项目根目录的.vscode文件夹中会生成一些配置文件。
2. 安装vscode插件
在vscode中安装以下插件:
- Unreal Engine 4 Snippets (该插件对UE5也适用)
- C/C++
3. 配置.vscode文件夹
编辑项目根目录的.vscode/c_cpp_properties.json文件,可以参考开头的官方文档中的配置。下面是我使用的配置,这里面的includePath和defines是按开头的视频里添加的,不加似乎也可以运行。
{
"configurations": [
{
"name": "testEditor Editor Win64 Development (test)",
"compilerPath": "D:\\IDE\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.35.32215\\bin\\Hostx64\\x64\\cl.exe",
"cStandard": "c17",
"cppStandard": "c++20",
"intelliSenseMode": "msvc-x64",
"compileCommands": "D:\\projects\\Unreal Projects\\test\\.vscode\\compileCommands_test.json",
"includePath": [
"${workspaceFolder}\\Plugins**",
"${workspaceFolder}\\Source**",
"${workspaceFolder}\\Intermediate**"
],
"defines": [
"UNICODE",
"_UNICODE",
"__UNREAL__",
"UBT_COMPILED_PLATFORM=Windows",
"WITH_ENGINE=1",
"WITH_UNREAL_DEVELOPER_TOOLS=1",
"WITH_APPLICATION_CORE=1",
"WITH_COREUOBJECT=1"
]
},
{
"name": "Win32",
"compilerPath": "D:\\IDE\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.35.32215\\bin\\Hostx64\\x64\\cl.exe",
"cStandard": "c17",
"cppStandard": "c++20",
"intelliSenseMode": "msvc-x64",
"compileCommands": "D:\\projects\\Unreal Projects\\test\\.vscode\\compileCommands_Default.json"
}
],
"version": 4
}
4. 在vscode中运行项目
点击vscode左侧的运行和调试,顶部的运行配置中选择Launch testEditor (Development)(工作区)(我的项目名是test),然后点击绿色的三角形按钮或者按F5运行项目。

下一篇 :nginx安装在root下的权限问题
版权所有,转载时必须以链接形式注明原始出处