Create a project

A new project

  1. Start the editor. The Project Hub opens.
  2. Select New Project... in the Project Hub.
  3. Enter a Name and a Location. Leave Include C++ module selected so the project is set up for C++ scripting.
  4. Select Create.
The New Project form: New Project... (1), the Name, the Location and Include C++ module (2), and Create (3)

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 title bar's Compile button, blue while a compile runs, to the right of Play, Pause and Step

The first compile takes longer than the ones after it because it sets the build up from scratch.

The project folder

PathWhat 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.iniThe project's name and settings
CMakeLists.txtBuilds 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
A new project's folder in File Explorer

The project comes with a .gitignore that leaves out Library/, Builds/, and the files that hold paths specific to your computer.

The editor

The editor with each panel labeled: Hierarchy, Scene View, Runtime View, Inspector, Asset Browser and Console
PanelWhat it shows
HierarchyThe objects in the open scenes
Scene ViewThe scene editor, where you place and arrange objects
Runtime ViewWhat the scene's camera sees. This is the game's screen when you press Play
InspectorThe selected object's components and their settings
Asset BrowserThe files in Assets/
ConsoleMessages from the engine 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.

The Window menu, listing every panel

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.

The Scripts menu, with Open in VS Code highlighted

The first time VS Code opens a project, it asks whether you trust the authors of the files in the folder. Select Yes, I trust the authors. Until a folder is trusted, VS Code opens it in Restricted Mode, which turns off the extensions and the project's settings. If a Restricted Mode bar runs across the top of the window, select Manage in it, then Trust.

VS Code asking whether you trust the authors of the project folder, with Yes, I trust the authors (1), and offering the recommended extensions, with Install (2)
VS Code in Restricted Mode: Manage in the bar across the top (1) opens the page that holds Trust (2)

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}.

The Settings panel: the Scripting page (1) and its External Editor field (2)

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.

The Project Hub's Add Existing Project form: Add Existing... (1), the project folder's path (2), and Add (3)