(1·VsCode_UE)
使用VSCode开发UE项目
- 修改ue->Editor Preferences->Source Code->vs code,设置默认编辑器,这样在general vs project files时将生成关于vs code的构建文件.code-workspace
- 配置vscode环境
- 安装下列插件
- C/C++
- C/C++ Extension Pack
- C#
- CMake
- CMake Tools
- 打开ide左下角的设置
- 修改C_Cpp Default Include Path项,Add Item
- ${workspaceFolder}/Intermediate/**
- ${workspaceFolder}/Plugins/**
- ${workspaceFolder}/Source/**
- ${default}
- < ue 版本引擎源码目录>\ \ Engine \ \ Source \ \ Runtime \ \ **
- 修改C_Cpp Default Include Path项,Add Item
- 安装下列插件
- 编译,Terminal->Run Task-> 选择 < 项目名 > Win64 Development build
- 运行, 点击Run->Start Debugger / F5,
- 如果报错:#include errors detected. Consider updating your compile_commands.json or includePath. Squiggles are disabled for this translation unit
- 选择左侧栏Run and Debug , 选择 Launch < 项目名 > (Development)( < 项目名 > )
- 如果报错:#include errors detected. Consider updating your compile_commands.json or includePath. Squiggles are disabled for this translation unit
- 断点调试,打断点,在引擎编辑器运行,即可触发断点
本文由作者按照 CC BY 4.0 进行授权