Create a project
A new project
- Start the editor. The Project Hub opens.
- Select New Project... in the Project Hub.
- Enter a Name and a Location. Leave Include C++ module selected so the project is set up for C++ code.
- Select Create.
The editor opens the project on its main scene, which holds a camera and a light.
The first compile
A new project's C++ code has not been compiled yet, so the editor compiles it in the background while you work. The Compile button in the title bar, beside Play, changes color while it runs. Hover over it to read the status: Configuring..., then Compiling..., then Up to date. The Console reports when the compile has finished.
The first compile takes longer than the ones after it, because it sets the build up from scratch.
The project folder
| Path | What it holds |
|---|---|
Assets/ | Scenes, materials, models, and everything else the game uses |
Source/ | Your C++ code. It starts with an ExampleComponent |
BuildProfiles/ | How the game is built. See Build and run |
Project.ini, ProjectSettings.ini | The project's name and settings |
CMakeLists.txt | Builds your C++ code. The editor runs it for you |
Library/ | Files the editor generates (such as imported assets and compiled code). It is rebuilt when missing |
Builds/ | The games you build |
The project comes with a .gitignore that leaves out Library/, Builds/, and the files that hold paths specific to your computer.
The editor
| Panel | What it shows |
|---|---|
| Hierarchy | The objects in the open scenes |
| Scene View | The scene, where you place and arrange objects |
| Runtime View | What the scene's camera sees. This is the game's screen when you press Play |
| Inspector | The selected object's components and their settings |
| Asset Browser | The files in Assets/ |
| Console | Messages from the editor and from your code, including compile errors |
The Window menu opens any panel you closed. Hold Shift while choosing one to open a second copy.
Your code editor
Scripts ▸ Open in VS Code opens the project in Visual Studio Code. The project includes settings for it, and VS Code offers to install the extensions it recommends: clangd for code completion, the C/C++ extension for debugging, and CMake Tools. Accept them.
To use a different editor, open Window ▸ Configuration ▸ Settings, go to the Scripting page, and set External Editor to the command that opens a file. The command can use {file}, {line}, and {column}.
Opening a project again
The Project Hub lists the projects you have opened. To add one it has not seen (such as a project you copied from another computer), select Add Existing..., enter the path of the project folder, and select Add.