Learning C++ in Unreal Engine: Project Structure

Julien Hora
tokyopixels
3 min readMay 22, 2024

--

In the previous episode, we have setup Unreal Engine and Rider. Now it’s crucial to understand the structure of an Unreal Engine project. This knowledge will help you navigate your project, organize your files, and understand where to implement your code.

An Overview of the Project Structure

When you create a new Unreal Engine project, several folders and files are generated. Here’s a breakdown of the key components:

Source Folder

  • Location: YourProject/Source
  • Purpose: Contains all your C++ source code files.
  • Key Files:

YourProjectName.Target.cs: Defines the target build settings for your project.

YourProjectNameEditor.Target.cs: Defines the target build settings for the editor.

YourProjectName.h and YourProjectName.cpp: Main header and source files for your project module.

Content Folder

  • Location: YourProject/Content
  • Purpose: Stores all your game assets, including textures, models, animations, Blueprints, and levels.
  • Key Subfolders:

Blueprints: Contains Blueprint assets.

Materials: Contains material assets.

Levels or Maps: Contains level maps.

Meshes: Contains 3D model assets.

Config Folder

  • Location: YourProject/Config
  • Purpose: Contains configuration files for your project.
  • Key Files:

DefaultEngine.ini: Engine configuration settings.

DefaultGame.ini: Game-specific settings.

Build Folder

  • Location: YourProject/Build
  • Purpose: Contains build configuration files for different platforms.
  • Key Files:

— Platform-specific build settings (e.g., Build.cs files).

Binaries Folder

  • Location: YourProject/Binaries
  • Purpose: Stores the compiled binary files for your project.
  • Key Files:

— Compiled executables and libraries.

Intermediate Folder

  • Location: YourProject/Intermediate
  • Purpose: Contains intermediate files generated during the build process.
  • Key Files:

— Temporary build files.

Saved Folder

  • Location: YourProject/Saved
  • Purpose: Stores saved data, logs, and backup files.
  • Key Files:

Logs: Log files generated by Unreal Engine.

Backups: Backup copies of your project files.

In addition to these essential folders, there are also a couple of key project files to remember:

.uproject File

  • Location: YourProject/YourProjectName.uproject
  • Purpose: The primary project file that contains metadata about your project. You can open this file with Rider or Unreal Engine.

Module Rules Files

  • Location: YourProject/Source/YourProject
  • Purpose: Defines the rules and dependencies for your project’s modules.
  • Key Files:

YourProject.Build.cs: Specifies build settings and dependencies.

Understanding the Role of Each Folder

Source Folder

This is where you’ll spend most of your time as a C++ developer. It contains your game’s core logic, classes, and functionalities.

Content Folder

Essential for organizing your game’s visual and audio assets. As your project grows, maintaining a structured Content folder is crucial for efficiency.

Config Folder

Configuration files control various aspects of your project. Understanding these settings can help you customize the engine’s behavior to fit your needs.

Build and Binaries Folders

These folders are mainly used during the compilation and build process. You’ll typically interact with them when configuring builds for different platforms.

Intermediate and Saved Folders

These folders store temporary and saved data. While they are essential for the engine’s operation, you won’t usually need to modify their contents directly.

Conclusion

Understanding the Unreal Engine project structure is vital for efficient development. Knowing where to find and place different types of files will streamline your workflow and help you manage your project effectively.

In the next article, we’ll dive into the basics of C++ syntax and concepts tailored specifically for Unreal Engine. This foundational knowledge will prepare you for writing and understanding C++ code in the context of game development.

Stay tuned and happy coding!

--

--

Julien Hora
tokyopixels

Founder @ Dreamrunner Labs | Senior Software Engineer | Unreal Engine Generalist