An open API service indexing awesome lists of open source software.

https://github.com/MrRobinOfficial/Guide-UnrealEngine

This repository is designed to help developers learn how to get started with Unreal Engine and C++.
https://github.com/MrRobinOfficial/Guide-UnrealEngine

cpp docs documentation examples guide learn unreal-engine

Last synced: about 1 year ago
JSON representation

This repository is designed to help developers learn how to get started with Unreal Engine and C++.

Awesome Lists containing this project

README

          

![Banner](static/img/Banner.png)

[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mrrobinofficial/guide-unitysteamnetcodegameobjects/blob/HEAD/LICENSE.txt)
![GitHub Repo stars](https://img.shields.io/github/stars/MrRobinOfficial/Guide-UnrealEngine)
![guide-status](https://img.shields.io/badge/guide_status-revision-91ff00)

![permitted-status](https://img.shields.io/badge/permitted_status-allow_to_use_for_tutorials_and_articles-4A5173)
![reading-time](https://img.shields.io/badge/reading_time-3,98_hours-blue)
![word-count](https://img.shields.io/badge/word_count-36,438-blue)

![GitHub issues](https://img.shields.io/github/issues/MrRobinOfficial/Guide-UnrealEngine)
![GitHub closed issues](https://img.shields.io/github/issues-closed/MrRobinOfficial/Guide-UnrealEngine)
![GitHub pull requests](https://img.shields.io/github/issues-pr/MrRobinOfficial/Guide-UnrealEngine)
![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/MrRobinOfficial/Guide-UnrealEngine)

#

**Are you interested in creating games with Unreal Engine using C++?**

_In this repo, we'll guide you through the basics of getting started with Unreal Engine and C++. We'll cover the fundamentals of C++ programming, such as data types and pointers, and show you how to use these concepts in the context of game development with Unreal Engine. We'll also introduce you to the Unreal Engine module system, which is an important aspect of organizing your game code into smaller, more manageable pieces._

> [!IMPORTANT]
> If you want to use another language for Unreal Engine, like C#, then highly recommend checking out this [repo by Oscar Olsson](https://github.com/UnrealSharp/UnrealSharp).

> [!NOTE]
> This repository was created in conjunction with [ChatGPT](https://en.wikipedia.org/wiki/ChatGPT) to assist in writing and formulating each sentence. While it provides valuable information, it may not be entirely accurate. If you detect any errors or false statements, please feel free to create a new [issue](https://github.com/MrRobinOfficial/Guide-UnrealEngine/issues/) to report them for further improvement and clarification.
>
> You can also send a new [pull request](https://github.com/MrRobinOfficial/Guide-UnrealEngine/pulls) to make correct changes to codebase.
>
> **Your contributions and feedback are appreciated!**

> [!NOTE]
> Examples and documentation are intended to work on **UE 5.0** version and upwards. Some code may or may not work on previous versions!

> [!IMPORTANT]
> If you want to see the newest changes, you can check out the [dev branch](https://github.com/MrRobinOfficial/Guide-UnrealEngine/tree/dev). However, be aware of experimental changes and work in progress text.

## Table of contents

- [πŸ‘‘ Cheatsheets](#-cheatsheets)
- [🎩 Plugins](#-plugins)
- [Marketplace Plugins](#marketplace-plugins)
- [Github Plugins](#github-plugins)
- [Epic Games Plugins](#epic-games-plugins)
- [MrRobinOfficial's Plugins](#mrrobinofficials-plugins)
- [πŸ“› Console Commands](#-console-commands)
- [πŸ“Œ Shortcuts](#-shortcuts)
- [βŒ› Getting started with C++](#-getting-started-with-c)
- [🌈 Integrated Development Environment](#-integrated-development-environment)
- [⛏️ Tools to help your journey](#-tools-to-help-your-journey)
- [🟒 Benefits of using C++ with Unreal Engine](#-benefits-of-using-c-with-unreal-engine)
- [πŸ”΄ Drawbacks of using C++ with Unreal Engine](#-drawbacks-of-using-c-with-unreal-engine)
- [🌍 Summary of C++ and Programming World](#-summary-of-c-and-programming-world)
- [🚧 Blueprint vs C++](#-blueprint-vs-c)
- [πŸŽͺ Architecture](#-architecture)
- [βš“ Guidelines](#-guidelines)
- [🎳 Naming Convention](#-naming-convention)
- [🎨 Abbreviations, Acronyms and Synonyms](#-abbreviations-acronyms-and-synonyms)
- [Prefixes](#prefixes)
- [Coding standard](#coding-standard)
- [πŸ’Ž Unreal Header Tool](#-unreal-header-tool)
- [UPROPERTY](#uproperty)
- [Specifiers](#specifiers)
- [Meta tags](#meta-tags)
- [Examples](#examples)
- [UFUNCTION](#ufunction)
- [Common Specifiers](#common-specifiers)
- [Common Meta tags](#common-meta-tags)
- [Examples](#examples-1)
- [UCLASS](#uclass)
- [Common Specifiers](#common-specifiers-1)
- [Common Meta tags](#common-meta-tags-1)
- [Examples](#examples-2)
- [USTRUCT](#ustruct)
- [Common Specifiers](#common-specifiers-2)
- [Common Meta tags](#common-meta-tags-2)
- [Examples](#examples-3)
- [UENUM](#uenum)
- [Common Specifiers](#common-specifiers-3)
- [Common Meta tags](#common-meta-tags-3)
- [Examples](#examples-4)
- [UPARAM](#uparam)
- [Examples](#examples-5)
- [UMETA](#umeta)
- [Common Specifiers](#common-specifiers-4)
- [Examples](#examples-6)
- [🧱 Data Types](#-data-types)
- [Characters](#characters)
- [Booleans](#booleans)
- [Integers](#integers)
- [Floating point numbers](#floating-point-numbers)
- [πŸ›Ÿ Size can vary](#-size-can-vary)
- [🦺 Unreal Engine Typedefs](#-unreal-engine-typedefs)
- [πŸ“– String Data Types](#-string-data-types)
- [Text Macros](#text-macros)
- [FName](#fname)
- [FText](#ftext)
- [FString](#fstring)
- [πŸš€ Math Data Types](#-math-data-types)
- [Vector4](#vector4)
- [Vector3](#vector3)
- [Vector2](#vector2)
- [IntPoint](#intpoint)
- [IntRect](#intrect)
- [Rotator](#rotator)
- [Quaternion](#quaternion)
- [Transform](#transform)
- [Plane](#plane)
- [Matrix](#matrix)
- [Sphere](#sphere)
- [Box](#box)
- [Box2D](#box2d)
- [Ray](#ray)
- [Colors](#colors)
- [πŸ’ Collections](#-collections)
- [TArray](#tarray)
- [TSet](#tset)
- [TMap](#tmap)
- [Common and helpful functions](#common-and-helpful-functions)
- [Algo Namespace](#algo-namespace)
- [TMultiMap](#tmultimap)
- [TStaticArray](#tstaticarray)
- [FHashTable](#fhashtable)
- [TStaticHashTable](#tstatichashtable)
- [TSortedMap](#tsortedmap)
- [TList](#tlist)
- [TLinkedList](#tlinkedlist)
- [TDoubleLinkedList](#tdoublelinkedlist)
- [TQueue](#tqueue)
- [TArrayView](#tarrayview)
- [String View](#string-view)
- [String Builder](#string-builder)
- [TEnumAsByte](#tenumasbyte)
- [🧨 Value type vs Reference type](#-value-type-vs-reference-type)
- [πŸ‘ˆ Pointers](#-pointers)
- [🦴 Raw pointers](#-raw-pointers)
- [πŸ€– Smart pointers library](#-smart-pointers-library)
- [TSharedPtr](#tsharedptr)
- [TWeakPtr](#tweakptr)
- [TUniquePtr](#tuniqueptr)
- [πŸ€– Smart `UObject` pointers](#-smart-uobject-pointers)
- [TWeakObjectPtr](#tweakobjectptr)
- [TWeakInterfacePtr](#tweakinterfaceptr)
- [TSoftObjectPtr](#tsoftobjectptr)
- [TSoftClassPtr](#tsoftclassptr)
- [πŸ”– Keywords](#-keywords)
- [Constants](#constants)
- [Access modifiers](#access-modifiers)
- [Class, struct and memory](#class-struct-and-memory)
- [Function related](#function-related)
- [Casts](#casts)
- [Flow controls](#flow-controls)
- [Generic programming](#generic-programming)
- [Misc](#misc)
- [πŸ‘· Constructors, destructors and initialization](#-constructors-destructors-and-initialization)
- [Constructors](#constructors)
- [Destructors](#destructors)
- [Constructors and destructors in UE](#constructors-and-destructors-in-ue)
- [Initialization](#initialization)
- [πŸ› Create custom class](#-create-custom-class)
- [AActor](#aactor)
- [UActorComponent](#uactorcomponent)
- [USceneComponent](#uscenecomponent)
- [APawn](#apawn)
- [UObject](#uobject)
- [πŸ› Create custom interface](#-create-custom-interface)
- [Creating interface inside C++](#creating-interface-inside-c)
- [Extending the interface function:](#extending-the-interface-function)
- [Calling the interface function](#calling-the-interface-function)
- [Checking if the UObject extends the interface](#checking-if-the-uobject-extends-the-interface)
- [Reference to an interface object](#reference-to-an-interface-object)
- [πŸ›Έ Reflection System](#-reflection-system)
- [πŸ—‘οΈ Garbage Collection](#-garbage-collection)
- [How does it work](#how-does-it-work)
- [Rules](#rules)
- [Examples](#examples-7)
- [Manual memory management](#manual-memory-management)
- [Collection and Mark as garbage](#collection-and-mark-as-garbage)
- [Validation](#validation)
- [πŸ’Ύ Soft vs hard references](#-soft-vs-hard-references)
- [Soft References](#soft-references)
- [Hard References](#hard-references)
- [🌍 Global Functions](#-global-functions)
- [πŸ›οΈ Libraries](#-libraries)
- [Kismet Library](#kismet-library)
- [Misc Library](#misc-library)
- [πŸ“ƒ Macros](#-macros)
- [πŸ“œ Logging](#-logging)
- [UE_LOGFMT](#ue_logfmt)
- [Log to game-view](#log-to-game-view)
- [πŸͺ¨ Assertions](#-assertions)
- [Check](#check)
- [Verify](#verify)
- [Ensure](#ensure)
- [Alternatives Assertions](#alternatives-assertions)
- [Misc Assertions](#misc-assertions)
- [πŸ”” Delegates](#-delegates)
- [Define a delegate type](#define-a-delegate-type)
- [Declare a delegate variable](#declare-a-delegate-variable)
- [Bind functions to the delegate](#bind-functions-to-the-delegate)
- [Trigger the delegate](#trigger-the-delegate)
- [Summary](#summary)
- [🧩 UMG](#-umg)
- [UMG with C++](#umg-with-c)
- [UI Tweening Library](#ui-tweening-library)
- [πŸ“š Create custom module](#-create-custom-module)
- [Module structure](#module-structure)
- [Module code](#module-code)
- [♻️ Circular Dependency](#-circular-dependency)
- [πŸ’‘ Create custom plugin](#-create-custom-plugin)
- [πŸ“ Preprocessor](#-preprocessor)
- [Pragma once](#pragma-once)
- [Strip out editor functionality](#strip-out-editor-functionality)
- [πŸ¦„ Units](#-units)
- [Use cases with UHT](#use-cases-with-uht)
- [Use cases with code](#use-cases-with-code)
- [🎨 Draw Debug Shapes](#-draw-debug-shapes)
- [Draw a point](#draw-a-point)
- [Draw a sphere](#draw-a-sphere)
- [Draw a circle](#draw-a-circle)
- [Draw a circle arc](#draw-a-circle-arc)
- [Draw a 2D donut](#draw-a-2d-donut)
- [Draw a solid box](#draw-a-solid-box)
- [Draw a wired box](#draw-a-wired-box)
- [Draw a cylinder](#draw-a-cylinder)
- [Draw a capsule](#draw-a-capsule)
- [Draw a cone](#draw-a-cone)
- [Draw a plane](#draw-a-plane)
- [Draw a line](#draw-a-line)
- [Draw an arrow](#draw-an-arrow)
- [Draw a crosshair](#draw-a-crosshair)
- [Draw a camera](#draw-a-camera)
- [Draw a mesh](#draw-a-mesh)
- [Draw a string:](#draw-a-string)
- [Draw a centripetal catmull-rom spline](#draw-a-centripetal-catmull-rom-spline)
- [⚑ Compiling a plugin](#-compiling-a-plugin)
- [⏳ Gameplay Timers](#-gameplay-timers)
- [🧡 Gameplay Tags](#-gameplay-tags)
- [Usage](#usage)
- [Data types](#data-types)
- [Code](#code)
- [🧠 Multithreading and Asynchronous Tasks](#-multithreading-and-asynchronous-tasks)
- [Multithreading](#multithreading)
- [Runnables](#runnables)
- [Tasks](#tasks)
- [AsyncTask](#asynctask)
- [ParallelFor](#parallelfor)
- [FNonAbandonableTask](#fnonabandonabletask)
- [🎯 Extend Unreal Editor](#-extend-unreal-editor)
- [Slate](#slate)
- [Creating custom asset type](#creating-custom-asset-type)
- [⚠️ Common Issues](#-common-issues)
- [β›” Compiler Errors](#-compiler-errors)
- [Compiler Error C2007](#compiler-error-c2007)
- [Compiler Error C2065](#compiler-error-c2065)
- [Compiler Error C2628](#compiler-error-c2628)
- [πŸ’£ Runtime Errors](#-runtime-errors)
- [πŸ’€ Semantic Errors](#-semantic-errors)
- [πŸ’  Integer overflow](#-integer-overflow)
- [πŸ’  Array overflow](#-array-overflow)
- [πŸ” Scope issues](#-scope-issues)
- [🐣 Tips and best practices](#-tips-and-best-practices)
- [Disable BlueprintPure](#disable-blueprintpure)
- [Switch case fall-through](#switch-case-fall-through)
- [πŸ“¦ Refactoring](#-refactoring)
- [Renaming](#renaming)
- [Extract Method](#extract-method)
- [Typedefs](#typedefs)
- [Introduce Variable](#introduce-variable)
- [Invert 'if' statement to reduce nesting](#invert-if-statement-to-reduce-nesting)
- [⏱ Ticking](#-ticking)
- [For actors](#for-actors)
- [For components](#for-components)
- [If you have to use tick](#if-you-have-to-use-tick)
- [`FTickFunction`](#ftickfunction)
- [MyTickableThing.h](#mytickablethingh)
- [MyTickableThing.cpp](#mytickablethingcpp)
- [πŸ”Œ Direct references](#-direct-references)
- [πŸ—οΈ Deep dive](#-deep-dive)
- [K2Node](#k2node)
- [βž— Math Expression Node](#-math-expression-node)
- [Call function in editor](#call-function-in-editor)
- [Call function via Console Commands](#call-function-via-console-commands)
- [Renaming variables without breaking references](#renaming-variables-without-breaking-references)
- [Sampling a curve](#sampling-a-curve)
- [HTTP requests](#http-requests)
- [Encryption and Decryption](#encryption-and-decryption)
- [πŸ”— Helpful Links](#-helpful-links)
- [YouTube Videos](#youtube-videos)
- [Articles](#articles)
- [Online Tools](#online-tools)
- [Misc](#misc-1)
- [πŸ†˜ Support](#-support)
- [πŸ“ Footnotes](#-footnotes)

## πŸ‘‘ Cheatsheets

Click to expand

![jbtronics - CheatSheet Poster](static/img/CheatSheet_Poster-1.png)[jbtronics - CheatSheet Poster](https://github.com/jbtronics/UE4-CheatSheet/blob/master/CheatSheet_Poster.pdf)

![Winslow - Unreal Engine 5 Blueprint CheatSheet Dark Theme](static/img/unreal-engine-5-blueprint-cheat-sheet-dark-theme-1.png)[Winslow - Unreal Engine 5 Blueprint CheatSheet Dark Theme](https://uecasts.com/resources/unreal-engine-5-blueprint-cheat-sheet-dark-theme?utm_source=epicgames&utm_campaign=cheat_sheet_ue5&utm_content=blueprint_dark)

![Winslow - Unreal Engine 5 C++ CheatSheet Dark Theme](static/img/unreal-engine-5-c-plus-plus-cheat-sheet-dark-theme-1.png)[Winslow - Unreal Engine 5 C++ CheatSheet Dark Theme](https://uecasts.com/resources/unreal-engine-5-c-plus-plus-cheat-sheet-dark-theme?utm_source=epicgames&utm_campaign=cheat_sheet_ue5&utm_content=c_plus_plus_dark)

![Winslow - Unreal Engine 5 Editor CheatSheet Dark Theme](static/img/unreal-engine-5-editor-cheat-sheet-dark-theme-1.png)[Winslow - Unreal Engine 5 Editor CheatSheet Dark Theme](https://uecasts.com/resources/unreal-engine-5-editor-hotkeys-cheat-sheet-dark-theme?utm_source=epicgames&utm_campaign=cheat_sheet_ue5&utm_content=hotkeys_dark)

![VictoriaLyons - ProfilingCheatSheet](static/img/ProfilingCheatSheet-1.png)[VictoriaLyons - ProfilingCheatSheet](https://www.reddit.com/r/unrealengine/comments/gqi2xu/quick_performance_cheat_sheet/)

## 🎩 Plugins

Click to expand

Over these years, I found some awesome and helpful plugins for extending and improving my productivity.

The plugins that I recommend the most are: **Advanced Renamer**, **Game Input**, **Common Maps**, **Quick Actions**, **ActorLocker**, **FlatNodes**, **CrystalNodes**, **ALS** and **Audio Meters**.

And here is a full list of plugins that I discovered so far:

### Marketplace Plugins

- [Achievement System](https://www.unrealengine.com/marketplace/en-US/product/achievement-system-blueprint-compatible) (Easily define and manage achievements in any UE4 project).
- [Animate](https://www.unrealengine.com/marketplace/en-US/product/animate-curve-driven-animations) (Animate anything using Vector Curves).
- [Attachment Sync](https://www.unrealengine.com/marketplace/en-US/product/attachment-sync) (Ability to any weapon to have attachments).
- [Audio Metering Lite](https://www.unrealengine.com/marketplace/en-US/product/audio-metering-lite) (lets you analyze and meter Submixes).
- [Auto Size Comments](https://www.unrealengine.com/marketplace/en-US/product/auto-size-comments) (makes comment boxes auto resize to fit the nodes inside).
- [Blueprintable Developer Settings](https://www.unrealengine.com/marketplace/en-US/product/blueprintable-developer-settings) (access to work with config files through blueprints and editor, just like `UDeveloperSettings`).
- [Common Maps](https://www.unrealengine.com/marketplace/en-US/product/common-maps) (Allows you to quickly switch to the maps you use frequently in the project you are working on by storing them in a list).
- [Custom Details Sections](https://www.unrealengine.com/marketplace/en-US/product/custom-details-sections) (Organize the details panel by grouping your variables into custom sections).
- [DzX Radial Menu](https://www.unrealengine.com/marketplace/en-US/product/dzx-radial-menu-umg/questions) (The radial menu plugin gives complete freedom in widget design for pie chart looking widgets).
- [Enhanced Input Sequence](https://www.unrealengine.com/marketplace/en-US/product/enhanced-input-sequence) (allows you to process Input Actions and their sequences).
- [Extended Debug Library](https://www.unrealengine.com/marketplace/en-US/product/extended-debug-library) (Extends some of the native debugging functions, exposing more functionality).
- [File System Library](https://www.unrealengine.com/marketplace/en-US/product/file-system-library) (Open, Save, Copy, Move and delete files and directories in tranquillity).
- [Game Flow](https://www.unrealengine.com/marketplace/en-US/product/game-flow) (Allows user to create state machines and configure them for various reasons).
- [Gradient Generator](https://www.unrealengine.com/marketplace/en-US/product/gradient-generator) (helps you create complex gradients).
- [Live Blueprint Debugger](https://www.unrealengine.com/marketplace/en-US/product/live-blueprint-debugger) (Integrates the Blueprint Debugger's variables window directly into the Level Editor's details panel for any selected Actor that is an instance of a Blueprint class).
- [Outliner Shortcuts](https://www.unrealengine.com/marketplace/en-US/product/outliner-shortcuts) (Allows the binding of shortcuts to some basic World Outliner functions).
- [Project Acoustics](https://www.unrealengine.com/marketplace/en-US/product/project-acoustics-for-unreal-audio) (audio wave acoustics engine for adding accurate acoustics to your 3D environments).
- [Project Cleaner](https://www.unrealengine.com/marketplace/en-US/product/projectcleaner) (Remove unused assets and empty folders in project).
- [Quest Editor Plugin](https://www.unrealengine.com/marketplace/en-US/product/quest-editor-plugin) (manage and create quests and dialogs for NPCs, with very dynamic and customizable features).
- [Quick Actions](https://www.unrealengine.com/marketplace/en-US/product/quick-actions) (Find anything inside Unreal quick).
- [Regex in Blueprints](https://www.unrealengine.com/marketplace/en-US/product/regex-in-blueprints) (Regular expressions available for blueprints).
- [Restart Unreal Editor](https://www.unrealengine.com/marketplace/en-US/product/restart-editor-01) (Utility to restart the Unreal Editor with a click or with a shortcut).
- [Screen Fade Library](https://www.unrealengine.com/marketplace/en-US/product/screen-fade-library) (Plugin that makes it easy to implement screen fade in Blueprints and C++).
- [SweejTech Audio Inspector](https://www.unrealengine.com/marketplace/en-US/product/sweejtech-audio-inspector) (Allows you to see a detailed, useful info about all active sounds in game in a compact editor tab window).
- [Time Clock](https://www.unrealengine.com/marketplace/en-US/product/time-clock) (Easily track how long you have to work in a project, and manage your times with alarms).
- [Universal Camera](https://www.unrealengine.com/marketplace/en-US/product/universal-camera) (A flexible camera for your games).

### Github Plugins

- [ActorLocker](https://github.com/Gradess2019/ActorLocker) (Ability to lock actors while editing the level).
- [Advanced Locomotion System Refactored](https://github.com/Sixze/ALS-Refactored) (C++ version).
- [Agora Static Mesh Thumbnail Renderer](https://github.com/ryanjon2040/AgoraStaticMeshThumbnailRenderer) (Provides some information about Static Mesh in Content Browser).
- [Aliaser](https://github.com/AyeTSG/Aliaser) (Allows aliases to be shown in the Content Browser).
- [ALS-Refactored XT](https://github.com/Voidware-Prohibited/ALSXT) (Expand ALS Refactored with expanded Character States, Improved Foot Print system, Sliding, Vaulting and Wallrunning).
- [AsyncLoadingScreen](https://github.com/truong-bui/AsyncLoadingScreen) (Ability to add custom loading screen).
- [Audio Analysis Tools](https://github.com/gtreshchev/AudioAnalysisTools) (Provides a variety of functions for analyzing audio data. Works in conjunction with the Runtime Audio Importer plugin).
- [Audio Meters for Unreal Engine 5.1](https://michaelgarydean.itch.io/audio-metering-editor-utility-widget) (Ability to monitoring your audio levels).
- [Batch Rename Tool](https://github.com/FrozenStormInteractive/Unreal-Batch-Rename-Tool) (rename multiple assets quickly with a set of naming rules).
- [BlueprintUE C++](https://github.com/blueprintue/blueprintue-cpp-plugin) (Allows you to send your blueprints on [](https://blueprintUE.com) associated to your account).
- [BUI Cheat Manager](https://github.com/benui-dev/UE-BUICheatManager/) (Cheat manager, providing a way of defining cheat shortcut).
- [Circular Dependencies Detector](https://github.com/bstt/CircularDependenciesDetector/).
- [CrystalNodes](https://github.com/SkylakeOfficial/CrystalNodes) (Beautify the unreal editor graph nodes).
- [CsToCpp](https://github.com/CSharpForUnrealEngine5/CsToCpp) (C# to UE C++ compiler).
- [CustomShapeButton](https://github.com/JanSeliv/CustomShapeButton) (Allows to make buttons of any shape in UE5.3).
- [Elementus Inventory](https://github.com/lucoiso/UEElementusInventory) (Data-Driven Inventory & Items system).
- [ExtendedUnreal](https://github.com/BenVlodgi/UE-ExtendedUnreal) (Exposes useful functions to Blueprints).
- [FlatNodes](https://github.com/brumenn/FlatNodes) (A minimalist style for Unreal Engine graph nodes).
- [FlowGraph](https://github.com/MothCocoon/FlowGraph) (Design-agnostic node system for scripting game’s flow).
- [Function Picker](https://github.com/JanSeliv/FunctionPicker) (Allows to choose a function right in the property from any blueprint in UE5.3).
- [Hotbar and Inventory System](https://github.com/finalstack/InventorySystem) (Easy to use Hotbar and Inventory system).
- [MDMetaDataEditor](https://github.com/DoubleDeez/MDMetaDataEditor) (Ability to edit metadata of Blueprint Properties, Functions, and Function and Event Parameters).
- [Neat Metadata](https://github.com/pramberg/NeatMetadata) (Allow various metadata to be used in Blueprints that is otherwise only available in C++.).
- [ObjectPool](https://github.com/dslabkowski/ObjectPool/) (Improve performance and memory use by reusing objects from a fixed pool instead of allocating and freeing them individually).
- [PBCharacterMovement](https://github.com/ProjectBorealis/PBCharacterMovement) (HL2-style, classic FPS movement for UE in C++).
- [Pool Manager](https://github.com/JanSeliv/PoolManager) (Helps reuse objects in UE5.3).
- [RefreshAllNodes](https://github.com/nachomonkey/RefreshAllNodes) (Ability to refresh all nodes in a single Blueprint Instance. Helpful when Blueprint version has not been updated to its counterpart of C++).
- [Serial Communication](https://github.com/videofeedback/Unreal_Engine_SerialCOM_Plugin) (Serial Com Port Library).
- [Settings Widget Constructor](https://github.com/JanSeliv/SettingsWidgetConstructor) (Automated UI generation of game settings from data table in UE5.3).
- [Subsystem Browser Plugin](https://github.com/aquanox/SubsystemBrowserPlugin/) (Adds a Subsystem Browser panel to explore running subsystems and edit their properties).
- [TabRestore](https://github.com/Theliraan/TabRestore) (restore closed tabs).
- [UI Tweening Library for UE4/UMG](https://github.com/benui-dev/UE-BUITween).
- [Unreal Blueprint CSV Parsing](https://github.com/IncantaGames/unreal-bp-csv-parsing).
- [UnrealImGui](https://github.com/benui-dev/UnrealImGui) (Integrates [Dear ImGui](https://github.com/ocornut/imgui) framework into Unreal Engine).
- [VoxelCore](https://github.com/VoxelPlugin/VoxelCore) (Use voxel inside UE).

### Epic Games Plugins

- [Advanced Renamer](https://dev.epicgames.com/documentation/en-us/unreal-engine) made by Epic Games.
- [Game Input](https://dev.epicgames.com/documentation/en-us/unreal-engine) made by Epic Games.
- [Chaos Vehicles](https://dev.epicgames.com/documentation/en-us/unreal-engine/vehicles-in-unreal-engine) made by Epic Games (Vehicle System).
- [Common UI](https://dev.epicgames.com/documentation/en-us/unreal-engine/common-ui-plugin-for-advanced-user-interfaces-in-unreal-engine) made by Epic Games. ​
- [Enhanced Input](https://dev.epicgames.com/documentation/en-us/unreal-engine/enhanced-input-in-unreal-engine) made by Epic Games.
- [Sun Position Calculator](hhttps://dev.epicgames.com/documentation/en-us/unreal-engine/geographically-accurate-sun-positioning-tool-in-unreal-engine) made by Epic Games (Real-time sky).

### MrRobinOfficial's Plugins

- [Common Time](https://github.com/MrRobinOfficial/Unreal-CommonTime) (Provides an editor view for editing DateTime and Timespan values).
- [Common Vehicle](https://github.com/MrRobinOfficial/Unreal-CommonVehicle) (Extend Chaos Vehicle System).
- [IniParser](https://github.com/MrRobinOfficial/Unreal-IniParser) (Import/export .ini files).

I am planning to make more plugins, which you can find me on [Github](https://github.com/MrRobinOfficial).

## πŸ“› Console Commands

This section was NOT written in conjunction with ChatGPT.

* `stat fps`: Display FPS.
* `stat unit`: Display frame time.
* `stat game`: Display a general idea on how long the various gameplay ticks are taking.
* `dumpticks`: Display a list of current actors, which currently ticks in the level.
* `slomo`: To speed up or slow down the game time.
* `obj list`: Display a list of current loaded objects.
* `obj list class=BP_PlayerCharacter_C`: Same as `obj list` but with a filter.
* `obj gc`: Collect all objects with GC (Garbage Collector).
* `au.Debug.AudioSoloSoundWave`: Takes a sound wave name as an additional input, and toggles whether that sound wave is solo (the only audible sound).

Here is also a [website](https://pongrit.github.io/) by Pongrit, which showcase all of Unreal Engine's console commands.

## πŸ“Œ Shortcuts

This section was NOT written in conjunction with ChatGPT.

To change any of the shortcuts, you can access the keyboard shortcut settings via **Editor Preferences**, then under **General** select **Keyboard Shortcuts**.

---

Basic

- Ctrl + C: Copy
- Ctrl + X: Cut
- Ctrl + V: Paste
- Del - Delete
- Ctrl + Y: Undo
- Ctrl + Z: Redo
- Ctrl + A: Select All
- Esc: Clear Selection
- Up/Down/Left/Right Arrow Keys: Move Selection
- Ctrl + Spacebar: Open Content Browser
- Ctrl + B: Find in Content Browser
- Ctrl + Tab: Browse Tabs
- Ctrl + O: Open Level
- Ctrl + P: Asset Picker
- Alt + P or Alt + S: Play/Simulate
- P: Show Nav Mesh
- Mouse Wheel Up/Down: Zoom

---

Outliner

- Ctrl + G or Shift + G: Group/Ungroup
- Right-Click on Group: Pin/Unpin

---

Blueprint editor

- Ctrl + S: Save Blueprint
- Ctrl + F: Find within Blueprint
- Ctrl + Shift + F: Find in all Blueprints

---

Level editing

- Ctrl + S: Save All
- End: Snap to Floor
- Alt + End: Snap Pivot to Floor
- Shift + End: Snap Bounds to Floor
- Ctrl + End: Snap Origin to Grid
- Alt + Transform: Duplicate and Transform

---

Camera/transformation

- Alt + G: Perspective View
- Alt + H: Front View
- Alt + J: Top View
- Alt + K: Side View
- F: Focus
- G: View
- R: Scale
- W: Translate
- E: Rotate
- Spacebar: Toggle Move/Rotate/Scale

---

Tools

- Ctrl + Shift + Comma: GPU Visualizer

## βŒ› Getting started with C++

This section was written in conjunction with ChatGPT.

Highly recommend taking a short class of native C++. Here is a video link to ~1h long [video tutorial from Mosh](https://www.youtube.com/watch?v=ZzaPdXTrSb8).

You can also watch a playlist from [GGameDev about getting started with Unreal Engine C++](https://youtube.com/playlist?list=PLaaDnVlfJwc4Lncf4XTYaTRG_osOk-T0N).

C++ is a statically typed, compiled, general-purpose programming language that offers a combination of high-level and low-level features. It was developed by [Bjarne Stroustrup](https://en.wikipedia.org/wiki/Bjarne_Stroustrup) at Bell Labs in 1979 as an enhancement to the [C language](https://en.wikipedia.org/wiki/C_(programming_language)), originally named C[^10] with Classes and later renamed [C++](https://en.wikipedia.org/wiki/C%2B%2B) in 1983.

You can read more about [C++ Language Reference from Microsoft Learn](https://learn.microsoft.com/en-us/cpp/cpp/cpp-language-reference?view=msvc-170).

Using C++ with Unreal Engine unlocks the engine's full feature set, allowing developers to harness advanced graphics rendering, physics simulations, networking, and AI capabilities. C++ provides a level of control, customization, and performance optimization that complements visual scripting.

Developing with C++ in Unreal Engine enables better debugging, profiling, and performance optimization through techniques such as multithreading and memory management. It also facilitates integration with third-party libraries, expanding the range of functionality and flexibility available to developers.

You can read more about it on [their docs](https://docs.unrealengine.com/5.2/en-US/unreal-engine-programming-and-scripting/).

To use C++ effectively in Unreal Engine, it is crucial to have a strong foundation in programming principles and understanding of Unreal Engine's architecture and conventions. Leveraging resources like the Unreal Engine documentation, community forums, and collaboration with other developers helps to gain knowledge and best practices.

*By combining the power of C++ and Unreal Engine, developers can create immersive experiences and unlock the full potential of the engine's capabilities.*

### 🌈 Integrated Development Environment

This section was written in conjunction with ChatGPT.

An Integrated Development Environment (IDE) is a software application that provides comprehensive tools for writing, debugging, and managing code. IDEs offer a streamlined and feature-rich environment for software development, making it easier for developers to work on their projects efficiently.

Popular IDEs used in Unreal Engine and C++ development include:

* [Visual Studio](https://visualstudio.microsoft.com/): The Visual Studio IDE for Unreal Engine development. It offers a powerful set of C++ tools and seamless integration with Unreal Engine, providing a robust development environment. `Free`.

* [Visual Studio Code (VSCode)](https://code.visualstudio.com/): Visual Studio Code is a lightweight, cross-platform code editor with a rich ecosystem of extensions, including ones for Unreal Engine development. `Free`.

* [Rider](https://www.jetbrains.com/rider/): Rider is a popular IDE developed by JetBrains, designed for game development, and it offers solid integration with Unreal Engine projects. `Cost`.

### ⛏️ Tools to help your journey

This section was NOT written in conjunction with ChatGPT.

Here are some tools that can be integrated into your IDE's for better performance, debugging or writing good code practices.

* [Visual Assist](https://www.wholetomato.com/): A productivity tool for refactoring, reading, writing, navigating and generating C/C++/C# code. `Cost` and for `VS`.

* [UnrealMacroGenerator](https://marketplace.visualstudio.com/items?itemName=Naotsun.Naotsun-UE-UMG): Provides a macro editor used by Unreal C ++ of Unreal Engine. You can create macros and edit already written macros. `Free` and for `VS`.

### 🟒 Benefits of using C++ with Unreal Engine

This section was written in conjunction with ChatGPT.

* High performance: C++ allows you to write code that can run directly on the CPU and GPU, making it possible to achieve very high performance levels in your game or application.

* Integration with existing codebases: If you have existing C++ code that you want to integrate with your Unreal Engine project, using C++ allows you to do so more easily.

* Access to low-level functionality: C++ gives you access to lower-level functionality than other programming languages, which can be especially useful in game development where fine-grained control over memory, data structures, and algorithms is often necessary.

* Garbage Collection and Memory Management: While C++ demands manual memory management, Unreal Engine provides a [garbage collector](https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)) that efficiently clears out `UObject` classes from memory. With the control over manual memory handling, you can precisely dictate when to allocate and deallocate memory as necessary.

### πŸ”΄ Drawbacks of using C++ with Unreal Engine

This section was NOT written in conjunction with ChatGPT.

* More prone to errors: C++ is a strongly typed language, requiring the precise use of semicolons, braces and accurate syntax to ensure successful compilation. Rectifying these issues can be time-consuming. On the contrary, the Blueprint's node-based graph system operates without the need for "correct" syntax, offering a more "forgiving" environment.

* Tied to Unreal's API: Throughout the evolution of Unreal Engine, Epic Games may modify the [source code](https://en.wikipedia.org/wiki/Source_code), rendering certain functions and members as **obsolete**/**deprecated**. Consequently, Unreal might recommend the need to update the codebase with the latest [API](https://en.wikipedia.org/wiki/API) changes. Failure to do so can lead to compilation errors, in the future.

* Updating your codebase: When working with C++ and Unreal Engine, your C++ code is compiled into a [.DLL](https://en.wikipedia.org/wiki/Dynamic-link_library) (in Windows OS) file that Unreal Engine can read and use within Blueprint graphs. However, this necessitates Unreal Engine to reload to incorporate your code changes. Epic Games has introduced [Hot Reload](https://unrealcommunity.wiki/live-compiling-in-unreal-projects-tp14jcgs), allowing for code reloading without editor restart, streamlining the development process. While Hot Reload often works for a while, it is unreliable and frequently causes blueprint corruption or other issues.

* Requires more storage: When working with C++ within Unreal Engine, it often involves using "Editor Symbols for debugging," consuming approximately 60 GB of storage. Similarly, if you opt to build Unreal Engine from its source code (on their github page), you'll require around 200 GB of storage space.

## 🌍 Summary of C++ and Programming World

If you wish to extend your knowledge about C++ and general programming principles and ideology, I highly recommend reading about this [section](https://github.com/MrRobinOfficial/Guide-UnrealEngine/blob/dev/README_CPP.md).

## 🚧 Blueprint vs C++

This section was written in conjunction with ChatGPT.

[![Watch the video by Alex Forsythe](https://img.youtube.com/vi/VMZftEVDuCE/maxresdefault.jpg)](https://youtu.be/VMZftEVDuCE)

**Choose C++** when you anticipate the need for interaction with other C++ code or require extensive control over low-level optimizations and memory management. C++ is well-suited for classes that require direct access to engine internals and efficient execution.

**Use Blueprint** as an inherited class when you want to benefit from the visual scripting capabilities and quick prototyping offered by Blueprint, while still having the option to incorporate C++ code in the future. This allows for a flexible approach where you can leverage the power of Blueprint while having the ability to extend functionality with C++ when needed.

## πŸŽͺ Architecture

This section was NOT written in conjunction with ChatGPT.

```mermaid
graph TD;
UObjectBase-->UObjectBaseUtility;
UObjectBaseUtility-->UObject;
UObject-->USubsystem;
USubsystem-->UDynamicSubsystem;
USubsystem-->UGameInstanceSubsystem;
USubsystem-->ULocalPlayerSubsystem;
USubsystem-->UWorldSubsystem;
UObject-->UBlueprintFunctionLibrary;
UObject-->UEngine;
UEngine-->UEditorEngine;
UEngine-->UGameEngine;
UObject-->UPlayer;
UPlayer-->ULocalPlayer;
UPlayer-->UNetConnection;
UObject-->UScriptViewportClient;
UScriptViewportClient-->UGameViewportClient;
UObject-->UGameInstance;
UGameInstance-->UPlatformGameInstance;
UObject-->UWorld;
UObject-->UPackage;
UObject-->ULevel;
UObject-->UInterface;
UObject-->USoundBase;
USoundBase-->USoundCue;
USoundBase-->USoundWave;
UObject-->UFXSystemAsset;
UFXSystemAsset-->UParticleSystem;
UObject-->UAnimationAsset;
UAnimationAsset-->UAnimSequenceBase;
UAnimSequenceBase-->UAnimSequence;
UObject-->UTexture;
UTexture-->UTexture2D;
UTexture-->UMediaTexture;
UObject-->UMaterial;
UObject-->UVisual;
UVisual-->UWidget;
UWidget-->UUserWidget;
UUserWidget-->UEditorUtilityWidget;
UObject-->UDataAsset;
UDataAsset-->UPrimaryDataAsset;
UObject-->AActor;
AActor-->AInfo;
AInfo-->AGameSession;
AInfo-->AGameModeBase;
AGameModeBase-->AGameMode;
AInfo-->AGameStateBase;
AGameStateBase-->AGameState;
AInfo-->AGameNetworkManager;
AInfo-->AWorldSettings;
AInfo-->APlayerState;
AActor-->ALevelScriptActor;
AActor-->AHUD;
AActor-->APlayerCameraManager;
AActor-->AController;
AController-->AAIController;
AController-->APlayerController;
AActor-->APawn;
APawn-->ADefaultPawn;
APawn-->ACharacter;
UObject-->UActorComponent;
UActorComponent-->UMovementComponent;
UActorComponent-->USceneComponent;
USceneComponent-->UAudioComponnent;
USceneComponent-->UCameraComponent;
USceneComponent-->ULightComponentBase;
USceneComponent-->UPrimitiveComponent;
UPrimitiveComponent-->UMeshComponent;
UMeshComponent-->UStaticMeshComponent;
UMeshComponent-->USkinnedMeshComponent;
USkinnedMeshComponent-->USkeletalMeshComponent;
UMeshComponent-->UWidgetComponent;
UPrimitiveComponent-->UShapeComponent;
UShapeComponent-->UBoxComponent;
UShapeComponent-->UCapsuleComponent;
UShapeComponent-->USphereComponent;
```

When getting started with Unreal Engine and their workflow, it can be intimidating to a class, since there are so many and with different purpose. However, I would argue it too helps grow your skills and experience by learning Unreal's architecture.

Not only do gain knowledge about Unreal, but also how a game engine could work under the hood. Compare to Unity, which is a [closed source](https://en.wikipedia.org/wiki/Proprietary_software) engine and their "architecture" is quite open to interpretation.

Unreal Engine was also built for creating an FPS multiplayer game. You can find some classes, which were intentionally designed for that FPS game, such as `AGameState` and `APlayerState` classes. Which are classes that keep track of match points and health points.

However, you can still use Unreal's architecture for different game genres. Unreal Engine works both for multiplayer and single player games.

Unreal has too many classes, which would take a very long time to explain each one of them. However, there are a couple of important classes, that I should mention:

Click to expand

- [UClass](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/CoreUObject/UObject/UClass) inherit `UStruct`

- An object class.

- [UObject](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/CoreUObject/UObject/UObject) inherit `UObjectBaseUtility`

- The base class of all UE objects.
- The type of an object is defined by its `UClass`.
- This provides support functions for creating and using objects, and virtual functions that should be overridden in child classes.

- [AActor](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/GameFramework/AActor) inherit `UObject`

- Actor is the base class for an Object that can be placed or spawned in a level.
- Actors may contain a collection of ActorComponents, which can be used to control how actors move, how they are rendered, etc. The other main function of an Actor is the replication of properties and function calls across the network during play.
- `AActor` itself doesn't have a transform (i.e. position in the world), it depends on the transform of the root component.
- _Common Functions_:
- `void PreInitializeComponents()` - Called before InitializeComponent is called on the actor's components. This is only called during gameplay and in certain editor preview windows.
- `void InitializeComponent()` - This will be called only if the component has bWantsInitializeComponentSet. This only happens once per gameplay session.
- `void PostInitializeComponents()` - Called after the actor's components have been initialized, only during gameplay and some editor previews.Β΄
- `void BeginPlay()` - Called when the level starts ticking, only during actual gameplay. This normally happens right after PostInitializeComponents but can be delayed for networked or child actors.
- `void Tick(float DeltaSeconds)` - Function called every frame on this Actor.
- `void EndPlay(const EEndPlayReason::Type EndPlayReason)` - Overridable function called whenever this actor is being removed from a level
- `void SetLifeSpan(float InLifespan)` - Set the lifespan of actor.
- `void Destroy(bool bNetForce, bool bShouldModifyLevel)` - Destroy the actor.
- `void SetActorTickEnabled(bool bEnabled)` - Set this actor's tick functions to be enabled or disabled.
- `void SetActorTickInterval(float TickInterval)` - Sets the tick interval of this actor's primary tick function.

- [APawn](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/GameFramework/APawn) inherit `AActor`

- Pawn is the base class of all actors that can be possessed by players or AI. They are the physical representations of players and creatures in a level.
- `APawn` provides basic possession mechanisms and support for input handling, as well as collision detection and physics simulation.
- _Common Functions_:
- `void BeginPlay()` - Called when the level starts ticking, only during actual gameplay.
- `void Tick(float DeltaSeconds)` - Update function, called every frame on Actor.
- `void EndPlay(const EEndPlayReason::Type EndPlayReason)` - Whenever actor is being removed from a level
- `void SetLifeSpan(float InLifespan)` - Set the lifespan of actor.
- `void Destroy(bool bNetForce, bool bShouldModifyLevel)` - Destroy actor.

- [AHUD](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/GameFramework/AHUD) inherit `AActor`

- Base class of the heads-up display. The HUD displays important information to the player, such as health and ammunition levels, as well as providing visual feedback for game events such as damage or power-up pickups.
- This has a canvas and a debug canvas on which primitives can be drawn. It also contains a list of simple hit boxes that can be used for simple item click detection. A method of rendering debug text is also included. Provides some simple methods for rendering text, textures, rectangles and materials which can also be accessed from blueprints.

- [ACharacter](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/GameFramework/ACharacter) inherit `APawn`

- Characters are Pawns (`APawn`) that have a mesh, collision, and built-in movement logic.
- They are responsible for all physical interaction between the player or AI and the world, and also implement basic networking and input models. They are designed for a vertically-oriented player representation that can walk, jump, fly, and swim through the world using `UCharacterMovementComponent`.
- `ACharacter` can be used as a base class for player characters, enemies, and other types of characters in the game.

- [AController](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/GameFramework/AController) inherit `AActor`

- Controllers are non-physical actors that can possess a Pawn to control its actions. PlayerControllers are used by human players to control pawns, while AIControllers implement the artificial intelligence for the pawns they control. Controllers take control of a pawn using their `Possess()` method, and relinquish control of the pawn by calling `UnPossess()`.
- Controllers receive notifications for many of the events occurring for the Pawn they are controlling. This gives the controller the opportunity to implement the behavior in response to this event, intercepting the event and superseding the Pawn's default behavior.
- ControlRotation (accessed via `GetControlRotation()`), determines the viewing/aiming direction of the controlled Pawn and is affected by input such as from a mouse or gamepad.

- [UActorComponent](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Components/UActorComponent) inherit `UObject`

- ActorComponent is the base class for components that define reusable behavior that can be added to different types of Actors.
- ActorComponents that have a transform are known as SceneComponents (`USceneComponent`) and those that can be rendered are PrimitiveComponents (`UPrimitiveComponent`).
- `UActorComponent` doesn't appear in the world.
- _Common Functions_:
- `void BeginPlay()` - Begins Play for component.
- `void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)` - Function called every frame on ActorComponent.
- `void EndPlay(const EEndPlayReason::Type EndPlayReason)` - Ends gameplay for component.

- [UMovementComponent](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/GameFramework/UMovementComponent) inherit `UActorComponent`

- MovementComponent is an abstract component class that defines functionality for moving a PrimitiveComponent (our UpdatedComponent) each tick.

- [USceneComponent](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Components/USceneComponent) inherit `UActorComponent`

- A SceneComponent has a transform and supports attachment, but has no rendering or collision capabilities.
- Useful as a 'dummy' component in the hierarchy to offset others.
- It's used by components that need to know its place in the world to run the logic, i.e. `UAudioComponnent`, `UCameraComponent`.

- [UPrimitiveComponent](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Components/UPrimitiveComponent) inherit `USceneComponent`

- PrimitiveComponents are SceneComponents that contain or generate some sort of geometry, generally to be rendered or used as collision data.
- There are several subclasses for the various types of geometry, but the most common by far are the ShapeComponents (Capsule, Sphere, Box), StaticMeshComponent, and SkeletalMeshComponent.
- ShapeComponents generate geometry that is used for collision detection but are not rendered, while StaticMeshComponents and SkeletalMeshComponents contain pre-built geometry that is rendered, but can also be used for collision detection.

- [USubsystem](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Subsystems/USubsystem) inherit `UObject`

- Subsystems are auto instanced classes that share the lifetime of certain engine constructs.
- Subsystems are responsible for initializing, updating, and shutting down their associated services, and can be used to customize or extend engine functionality as needed.
- 6 types of subsystems
- [UEngineSubsystem](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Subsystems/UEngineSubsystem) Share lifetime of Engine.
- [UEditorSubsystem](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Editor/EditorSubsystem/UEditorSubsystem) - Share the lifetime of the Editor.
- [UGameInstanceSubsystem](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Subsystems/UGameInstanceSubsystem) Share lifetime of game instance.
- [ULocalPlayerSubsystem](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Subsystems/ULocalPlayerSubsystem) - Share lifetime of local players.
- [UWorldSubsystem](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Subsystems/UWorldSubsystem) - Share lifetime of a `UWorld`.
- [UTickableWorldSubsystem](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Subsystems/UTickableWorldSubsystem) - Share lifetime of a `UWorld` and are ticking along with it.

- [UBlueprintFunctionLibrary](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Kismet/UBlueprintFunctionLibrary) inherit `UObject`

- This class is a base class for any function libraries exposed to blueprints.
- Methods in subclasses are expected to be static, and no methods should be added to this base class.

- [UEngine](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Engine/UEngine), [UEditorEngine](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Editor/UnrealEd/Editor/UEditorEngine) and [UGameEngine](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Engine/UGameEngine) inherit `UObject`

- Abstract base class of all Engine classes, responsible for management of systems critical to editor or game systems. Also defines default classes for certain engine systems.
- `UGameEngine` manages core systems that enable a game.
- `UEditorEngine` drives the Editor. Separate from `UGameEngine` because it may have much different functionality than desired for an instance of a game itself.

- [UGameViewportClient](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Engine/UGameViewportClient) inherit `UScriptViewportClient`

- A game viewport (FViewport) is a high-level abstract interface for the platform specific rendering, audio, and input subsystems.
- Exactly one GameViewportClient is created for each instance of the game.

- [ULocalPlayer](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Engine/ULocalPlayer) inherit `UObject`

- Each player that is active on the current client/listen server has a LocalPlayer.
- It stays active across maps, and there may be several spawned in the case of splitscreen/coop. There will be 0 spawned on dedicated servers.
- LocalPlayer is often used in conjunction with other classes, such as `APlayerController`, to manage local player interactions with the game.
- _Common Functions_:
- `TSubsystemClass* GetSubsystem() const` - Get a Subsystem of specified type

- [UWorld](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Engine/UWorld) inherit `UObject`

- The World is the top level object representing a map or a sandbox in which Actors and Components will exist and be rendered.
- A World can be a single Persistent Level with an optional list of streaming levels that are loaded and unloaded via volumes and blueprint functions or it can be a collection of levels organized with a World Composition.
- In a standalone game, generally only a single World exists except during seamless area transitions when both a destination and current world exists. In the editor many Worlds exist: The level being edited, each PIE instance, each editor tool which has an interactive rendered viewport, and many more.
- _Common Functions_:
- `void SpawnActor()` or `void SpawnActorDeferred()` - Spawn an actor from it's class. Deferred method will allow you to set actor properties before it's spawned into the world.

- [ULevel](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Engine/ULevel)

- A Level is a collection of Actors (lights, volumes, mesh instances etc.). Multiple Levels can be loaded and unloaded into the World to create a streaming experience.

- [UGameInstance](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Engine/UGameInstance) inherit `UObject`

- High-level manager object for an instance of the running game. Spawned at game creation and not destroyed until game instance is shut down. Running as a standalone game, there will be one of these. Running in PIE (play-in-editor) will generate one of these per PIE instance.
- The game instance can be used to manage persistent data and game state across levels, as well as to perform global game operations such as handling networking, input, and other system-level tasks.

- [AGameMode](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/GameFramework/AGameMode) inherit `AGameModeBase`

- GameMode is a subclass of GameModeBase that behaves like a multiplayer match-based game.
- It has default behavior for picking spawn points and match state. Or you define the rules and mechanics of a particular game mode, such as deathmatch or capture the flag.
- If you want a simpler base, inherit from GameModeBase instead.
- Each level (`ULevel`) in a game can have its own `AGameMode`, allowing for different game modes to be used in different levels.

- [AGameState](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/GameFramework/AGameState) inherit `AGameStateBase`

- GameState is a subclass of GameStateBase that behaves like a multiplayer match-based game. It is tied to functionality in GameMode.
- `AGameState` can also be used to synchronize game state across multiple clients in a networked game, ensuring that all players have an accurate view of the game world.

- [APlayerState](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/GameFramework/APlayerState) inherit `AInfo`

- A PlayerState is created for every player on a server (or in a standalone game).
- PlayerStates are replicated to all clients, and contain network game relevant information about the player, such as playername, score, etc.

- [UWidget](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/UMG/Components/UWidget) inherit `UVisual`

- This is the base class for all wrapped Slate controls that are exposed to UObjects.

- [UUserWidget](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/UMG/Blueprint/UUserWidget) inherit `UWidget`

- A widget that enables UI extensibility through WidgetBlueprint.
- `UUserWidget` provides a flexible framework for creating UI elements such as buttons, text fields, and images, and can be customized to implement complex UI behaviors such as animations, transitions, and data binding.

- [UAssetManager](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Engine/UAssetManager) inherit `UObject`

- A singleton `UObject` that is responsible for loading and unloading PrimaryAssets, and maintaining game-specific asset references Games should override this class and change the class reference

- [UDataAsset](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Engine/UDataAsset) inherit `UObject`

- Create a simple asset that stores data related to a particular system in an instance of this class.
- Assets can be made in the Content Browser using any native class that inherits from this.
- If you want data inheritance or a complicated hierarchy, Data Only Blueprint Classes should be created instead.

- [UPrimaryDataAsset](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Engine/UPrimaryDataAsset) inherit `UDataAsset`

- A DataAsset that implements `GetPrimaryAssetId()` and has asset bundle support, which allows it to be manually loaded/unloaded from the AssetManager (`UAssetManager`).
- Represents a primary data asset in the engine. A primary data asset is a piece of game content that is created in the Unreal Editor, such as a mesh, texture, sound, or level. `UPrimaryDataAsset` provides a base class for creating custom data assets that can be loaded and used by the game at runtime.
- `UPrimaryDataAsset` can be used to manage and organize game content, and can be customized to provide additional functionality such as data validation and metadata management.

- [USoundBase](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Sound/USoundBase) inherit `UObject`

- The base class for a playable sound object
- `USoundBase` can be used to play sound effects, music, and other audio in the game world.
- `USoundBase` provides a number of features for controlling the playback of audio, including volume, pitch, and spatialization effects such as 3D sound and reverb.

- [UMaterial](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Materials/UMaterial) inherit `UMaterialInterface`

- A Material is an asset which can be applied to a mesh to control the visual look of the scene.
- When light from the scene hits the surface, the shading model of the material is used to calculate how that light interacts with the surface.

- [UMaterialInstance](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Materials/UMaterialInstanceDynamic) inherit `UMaterialInterface`

- A instance of a material asset. This way, you can create a hierarchy material system.

- [UMaterialInstanceDynamic](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Materials/UMaterialInstanceDynamic) inherit `UMaterialInstance`

- A dynamic spawned instance material.

- [UTexture](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Engine/UTexture) inherit `UObject`

- Represents an image or texture that can be used in the engine for various purposes such as materials or user interface elements.

- [UTexture2D](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Engine/UTexture2D) inherit `UTexture`
- Represents an 2D image or texture that can be used in the engine for various purposes such as materials or user interface elements.

You can read more about [Unreal Architecture at their docs](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/).

And for more information about Unreal's Architecture. Then I highly recommend, you can watch [underscore about Unreal Engine Architecture](https://www.youtube.com/watch?v=QcXHEsR0xHI) video.

You can also watch a video discussion about [Multiplayer Framework of Unreal Engine from Kekdot](https://www.youtube.com/watch?v=Hsr6mbNKBLU).

> [!NOTE]
> This architecture is based on a multiplayer game setup. However, if you are making a singleplayer game, then you can ignore some of classes. Mainly `APlayerState` and `AGameState` (as well as their base classes).

You can also watch [The Unreal Engine Game Framework: From int main() to BeginPlay by Alex Forsythe](https://www.youtube.com/watch?v=IaU2Hue-ApI), which he talks how Unreal starts your game/editor from the source code. And how these classes work with each other.

## βš“ Guidelines

You can find more information about Unreal Engine's guideline, both for [inside the editor](https://dev.epicgames.com/documentation/en-us/unreal-engine/recommended-asset-naming-conventions-in-unreal-engine-projects) (asset creation), but also their [coding standard](https://dev.epicgames.com/documentation/en-us/unreal-engine/epic-cplusplus-coding-standard-for-unreal-engine).

### 🎳 Naming Convention

This section was written in conjunction with ChatGPT.

![Naming Conventions](static/img/Naming_conventions.png)

There is a github repo, which talks about Unreal's naming convention. The repo is very detailed and explains how you should name your assets, as well as your code. Repo is called [Unreal Engine's style guide by Michael Allar](https://github.com/Allar/ue5-style-guide).

Unreal Engine follows a specific naming convention that helps maintain consistency and readability in the codebase. When using Naming Conventions, all code and comments should use U.S. English spelling and grammar.

Pascal case is a naming convention used in programming and other contexts where compound words or phrases are created by capitalizing the first letter of each word and joining them without spaces. In Unreal Engine, pascal case is commonly used for naming classes, member variables, functions, and other constructs.

In Unreal Engine, the use of pascal case for classes is part of the naming convention for user-defined classes. When you create a new class in Unreal Engine, it is recommended to use pascal case for the class name. For example:

```cpp
class AMyPlayerCharacter : public ACharacter
{
// Class definition here
};
```

Similarly, pascal case is used for member variables and functions in Unreal Engine to maintain consistency and improve code readability. For example:

```cpp
class AMyPlayerCharacter : public ACharacter
{
public:
UPROPERTY()
float MovementSpeed;

UFUNCTION()
void Jump();
};
```

Boolean variables, which uses a prefix of `b` followed by a descriptive name in pascal case.
For example, a boolean variable that controls whether a character is running might be named: `bIsRunning`.

Variable, method, and class names should be:

- Clear
- Unambiguous
- Descriptive

The greater the scope of the name, the greater the importance of a good, descriptive name. Avoid over-abbreviation.

```cpp
// what does true mean?
bool CheckTea(FTea Tea);

// name makes it clear true means tea is fresh
bool IsTeaFresh(FTea Tea);
```

#### 🎨 Abbreviations, Acronyms and Synonyms

This section was written in conjunction with ChatGPT.

Common Language features

- `arg` - Argument
- `arr` - Array
- `async` - Asynchronous
- `attr` - Attribute
- `auth` - Authentication
- `btn` - Button
- `buff` - Buffer
- `ctx` - Context
- `const` - Constant
- `db` - Database
- `dest` - Destination
- `desc` - Description
- `doc` or `docs` - Documentation
- `dir` - Direction or Directory (depending on the context)
- `elem` - Element
- `err` - Error
- `e` or `evt` - Event
- `exe` - Execution
- `expr` - Expression
- `ext` - Extension
- `func` - Function
- `fmt` - Format
- `gen` - Generation
- `hex` - Hexadecimal
- `impl` - Implementation
- `imp` - Import
- `i` or `idx` - Index
- `info` - Information
- `init` - initialization
- `it` or `iter` - Iterator
- `ident` - Identifier
- `lang` - Language
- `len` - Length
- `lvl` - Level
- `lib` - Library
- `loc` - Location
- `msg` - Message
- `num` - Number
- `obj` - Object
- `opt` - Option
- `out` - Output
- `pkg` - Package
- `param` - Parameter
- `px` - Pixel
- `pos` - Position
- `prev` - Previous
- `priv` - Private
- `pub` - Public
- `q` - Query
- `rand` - Random
- `rng` - Range
- `ref` - Reference
- `rm` or `rmv` - Remove
- `req` - Request
- `res` - Result or Response (depending on the context)
- `ret` - Return
- `sel` - Selection
- `sep` - Separator
- `sec` - Sequence
- `sol` - Solver
- `src` - Source
- `spec` - Specifier or Specification (depending on the context)
- `std` - Standard
- `stdio` - Standard Input Output
- `stmt` - Statement
- `stat` - Statistic
- `str` - String
- `sync` - Synchronization
- `tmp` - Temperature
- `temp` - Temporary
- `util` - Utility
- `val` - Value
- `var` - Variable
- `ws` - White space
- `win` - Windows
- `wiz` - Wizard

---

Unreal Engine features

- `PC` - Indicates that a variable is a **PlayerController**
- `LP` - Indicates that a variable is a **LocalPlayer**
- `Char` - Indicates that a variable is a **Character** (not to be confused about `char` data type)
- `Comp` - Indicates that a variable is a **component**
- `Ptr` - Indicates that a variable is a **pointer** to an object.
- `Ref` - Indicates that a variable is a **reference** to an object.
- `dt` - Delta Time

---

Networking

- `OAuth` or Open Authentication – An open standard for authenticating applications or websites to access the content.
- `TCP` or Transmission Control Protocol – A standard defining how to exchange messages between systems.
- `UDP` or User Datagram Protocol – A standard defining how to exchange messages between systems.

---

Tools/Frameworks

- `IDE` or Integrated Development Environment - A software application that provides facilities to programmers for software development.
- `JSON` or Javascript Object Notation – A file format, written with JavaScript[^14] notation, used widely for transferring data over the network.
- `XML` or Extensible Markup Language – A markup language used mainly for storing and transporting data.
- `SQL` or Structured Query Language – A query language for storage, retrieval, and modification of data.
- `CSV` or Comma-separated values - A CSV file is a delimited text file that uses a comma to separate values.

---

Math

- `add` - Addition
- `sub` - Subtraction
- `mul` - Multiplication
- `div` - Division
- `abs` - Absolute
- `sin` - Sinus
- `cos` - Cosinus
- `tan` - Tangens
- `rad` - Radian
- `r` - Radius
- `frac` - Fraction
- `freq` - Frequency
- `long` - Longitude or Longitudinal (depending on the context)
- `lat` - Latitude or Lateral (depending on the context)
- `sqrt` - Square Root
- `mod` - Modulo
- `min` - Minimum
- `max` - Maximum
- `lerp` - Linear Interpolation

---

Misc

- `API` or Application Programming Interface – An interface for connecting multiple isolated components.
- `SDK` or Software Development Kit – A collection of software often needed for development in a specific platform.
- `TDD` or Test-driven development - TDD is a software development process that is based on the repetition of a short development cycle: requirements are turned into specific test cases, and then the code is fixed so that the tests pass.
- `UUID` or Universally unique identifier - A UUID is a 128-bit number used to identify information in computer systems.
- `GUI` or Graphic User Interface - A GUI or graphical user interface is a form of user interface that allows users to interact with electronic devices through a graphical interface.
- `misc` - Miscellaneous
- `os` - Operating System
- `org` - Organization
- `pwr` - Power
- `pref` - Preference
- `repo` - Repository

#### Prefixes

| Prefix | Class | Subclasses |
| ------ | ------------ | --------------------------------------------------------------------- |
| U | `UObject` | `UActorComponent`, `UPrimaryDataAsset`, `UEngine`, `UGameplayStatics` |
| A | `AActor` | `APawn`, `ACharaacter`, `AController`, `AHUD`, `AGameMode` |
| F | Struct | `FHitResult`, `FVector`, `FRotator`, `FTableRowBase` |
| E | Enum | `EEnvQueryStatus`, `EConstraintType`, `EEndPlayReason` |
| I | Inteface | `IInputDevice`, `IHapticDevice`, `ITargetPlatform` |
| T | Template | `TSubclassOf`, `TArray`, `TSet`, `TMap`, `TMultiMap` |
| G | Global Class | `GEngine`, `GConfig`, `GWorld`, `GEngineLoop`, `GIsEditor` |

> [!TIP]
> Did you know that `F` prefix actually stands for `Float` (floating point). but it was inadvertently spread throughout and has lost its original meaning.

### Coding standard

> Coding conventions are a set of guidelines for a specific programming language that recommend programming style, practices, and methods for each aspect of a program written in that language.
>
> These are guidelines for software structural quality. Software programmers are highly recommended to follow these guidelines to help improve the readability of their source code and make software maintenance easier.
>
> -- [Wikipedia](https://en.wikipedia.org/wiki/Coding_conventions)

Enumerated (Enum) classes are a replacement for old-style namespaced enums, both for regular enums and `UENUMs`. For example:

```cpp
// Old enum
UENUM()
namespace EThing
{
enum Type
{
Thing1,
Thing2
};
}

// New enum
UENUM()
enum class EThing : uint8
{
Thing1,
Thing2
}
```

Enums are supported as `UPROPERTYs`, and replace the old `TEnumAsByte<>` workaround. Enum properties can also be any size, not just bytes:

```cpp
// Old property
UPROPERTY()
TEnumAsByte MyProperty;

// New property
UPROPERTY()
EThing MyProperty;
```

## πŸ’Ž Unreal Header Tool

This section was written in conjunction with ChatGPT.

Unreal Header Tool (UHT[^2]) is a code generator and reflection system in Unreal Engine. It processes special macros and meta tags in C++ header files and generates additional code to support Unreal Engine's reflection system, which enables various engine features like Blueprint integration, serialization, networking, and more.

Layout:

```cpp
UPROPERTY([specifier1=setting1, specifier2, ...], [meta=(key1="value1", key2="value2", ...))])
UFUNCTION([specifier1=setting1, specifier2, ...], [meta=(key1="value1", key2="value2", ...))])
UCLASS([specifier1=setting1, specifier2, ...], [meta=(key1="value1", key2="value2", ...))])
USTRUCT([specifier1=setting1, specifier2, ...], [meta=(key1="value1", key2="value2", ...))])
UENUM([specifier1=setting1, specifier2, ...])
UPARAM([specifier1=setting1, specifier2, ...])
UMETA([specifier1=setting1, specifier2, ...])
```

| Macro | Description | Use Case |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| UPROPERTY | Specifies properties of a class member, such as replication, serialization, editability, and blueprint visibility. | Used to define properties of variables within a class to control how they are handled by Unreal Engine systems. |
| UFUNCTION | Identifies a C++ function that can be accessed and called from Blueprint visual scripting or other systems in Unreal Engine. | Used to expose C++ functions to Blueprint for easy use in visual scripting and integration with Unreal Engine. |
| UCLASS | Defines a C++ class that is exposed to Unreal Engine's reflection system, allowing it to be used in Blueprint and other engine features. | Used to define classes that can be used in Blueprint and integrated into Unreal Engine systems like the Editor. |
| USTRUCT | Specifies a C++ struct that can be used with Unreal Engine's reflection system, making it usable in Blueprint and other engine features. | Used to define structs that can be used in Blueprint and integrated into Unreal Engine systems like the Editor. |
| UENUM | Defines a C++ enumeration that can be used with Unreal Engine's reflection system, making it usable in Blueprint and other engine features. | Used to define enumerations that can be used in Blueprint and integrated into Unreal Engine systems like the Editor. |
| UPARAM | Specifies how a function parameter should be treated when used in Blueprint or other Unreal Engine systems. | Used to define parameter properties, such as Blueprint read/write access, in C++ functions exposed to Blueprint. |
| UMETA | Provides additional metadata for UPROPERTY, UFUNCTION, UCLASS, USTRUCT, and UENUM, allowing customization of their behavior in Unreal Engine's reflection system. | Used to attach additional information or customizations to C++ entities exposed to Unreal Engine reflection. |

### UPROPERTY

`UPROPERTY` is a macro used to declare a property within a class that needs to be exposed to the Unreal Engine's reflection system. It allows the property to be accessed and modified by the engine and Blueprint scripts.

#### Specifiers

- `EditAnywhere`: Allows the property to be edited in the editor and during runtime for all instances of the class.

- `EditDefaultsOnly`: Permits editing the property only for the class's default object in the editor.

- `EditInstanceOnly`: Enables editing the property only for instances of the class during runtime.

- `VisibleAnywhere`: Displays the property value in the editor for all instances of the class.

- `VisibleDefaultsOnly`: Shows the property value in the editor for the class's default object.

- `VisibleInstanceOnly`: Displays the property value in the editor only for instances of the class.

- `BlueprintReadOnly`: Exposes the property to Blueprint scripts, but only for reading, not writing.

- `BlueprintReadWrite`: Exposes the property to Blueprint scripts for both reading and writing.

- `Category`: Organizes properties into named categories in the editor for better organization and readability.

- `EditFixedSize`: Specifies that an `TArray` or `TMap` property should be editable in the Details Panel of the editor with a fixed number of elements, preventing addition or removal.

- `Transient`: Indicates that a property should not be serialized, making it non-persistent and not saved when saving the state of the object.

- `Replicated`: Automatically replicates the property's value to clients in a multiplayer environment when the property changes on the server.

- `ReplicatedUsing`: Specifies a custom function that should be called on both the server and clients to handle replication of the property's value.

- `SimpleDisplay`: Indicates that the property's value should be displayed in a simple and concise manner in editor UI.

- `AdvancedDisplay`: Indicates that the property's value should be displayed with advanced options in editor UI.

- `Config`: Marks the property to be serialized to the project configuration file for external customization.

- `GlobalConfig`: Marks the property to be serialized to the global configuration file for external customization across all projects.

#### Meta tags

- `DisplayName`: Sets a custom display name for the property in the editor.

- `Tooltip`: Provides a tooltip description for the property in the editor.

- `ClampMin`: Sets the minimum allowed value for the property in the editor.

- `ClampMax`: Sets the maximum allowed value for the property in the editor.

- `AllowPrivateAccess`: Allows access to private members within the class it belongs to.

- `Units`: Provides a human-readable unit label for the property in the editor.

- `ForceUnits`: Forces the units to be set. Rather than the editor deciding on what it wants instead.

#### Examples

```cpp
UPROPERTY(EditAnywhere, Category="Hello|Cruel|World")
int32 EditAnywhereNumber;
```

```cpp
UPROPERTY(Transient, Replicated)
int32 CurrentHealth;

UPROPERTY(Transient, ReplicatedUsing=OnArmorChanged)
int32 CurrentArmor;

UFUNCTION()
void OnArmorChanged();
```

```cpp
UPROPERTY(EditAnywhere, SimpleDisplay)
int32 MaxHealth = 100;

UPROPERTY(EditAnywhere, AdvancedDisplay)
float HealthRegenerationTime = 5.0f;
```

```cpp
// Must mark UCLASS with Config specifier

// Config can be overriden from the base class.
UPROPERTY(Config, BlueprintReadOnly)
bool bRegenerateHealth;

// GlobalConfig CANNOT be overridden from the base class.
UPROPERTY(GlobalConfig, BlueprintReadOnly)
bool bEnableHealthSimulation;
```

```cpp
UPROPERTY(EditAnywhere, EditFixedSize)
TArray Usernames = { TEXT("JohnDoe"), TEXT("MrRobin"), TEXT("JaneDoe") };
```

```cpp
UPROPERTY(EditAnywhere, meta=(Units="Celsius"))
float CookingTemperature;

UPROPERTY(EditAnywhere, meta=(Units="Kilograms"))
float TigerWeight;

UPROPERTY(EditAnywhere, meta=(Units="GB"))
float DiskSpace;

UPROPERTY(EditAnywhere, meta=(Units="Percent"))
float Happiness;

UPROPERTY(EditAnywhere, meta=(Units="times"))
float Deliciousness;
```

You can read more about [UPROPERTY by BenUi](https://benui.ca/unreal/uproperty/).

### UFUNCTION

`UFUNCTION` is a macro used to declare a function within a class that needs to be exposed to the Unreal Engine's reflection system. It allows the function to be used in Blueprint scripts and network replication.

#### Common Specifiers

- `BlueprintCallable`: Exposes the function to Blueprint scripts, allowing it to be called from within Blueprint graphs.

- `BlueprintPure`: Indicates that the function is a pure computation and does not modify any state, making it safe to use in Blueprint graphs without side effects.

- `BlueprintImplementableEvent`: Serves as a placeholder function in C++ that can be overridden and implemented in Blueprint.

- `BlueprintNativeEvent`: Similar to `BlueprintImplementableEvent`, but it also provides a C++ implementation that can be optionally overridden in Blueprint.

- `Category`: Organizes properties into named categories in the editor for better organization and readability.

#### Common Meta tags

- `DisplayName`: Sets a custom display name for the function in the editor.

- `Tooltip`: Provides a tooltip description for the function in the editor.

- `ShortToolTip`: Provides a short tooltip description for the function in the editor.

- `AllowPrivateAccess`: Allows access to private members within the class it belongs to.

- `HideSelfPin`: Hides the "self" pin, which indicates the object on which the function is being called. The "self" pin is automatically hidden on `BlueprintPure` functions that are compatible with the calling Blueprint's Class. Functions that use the `HideSelfPin` Meta Tag frequently also use the `DefaultToSelf` Specifier.

- `BlueprintInternalUseOnly`: This function is an internal implementation detail, used to implement another function or node. It is never directly exposed in a Blueprint graph.

- `BlueprintProtected`: This function can only be called on the owning Object in a Blueprint. It cannot be called on another instance.

- `DeprecatedFunction`: Any Blueprint references to this function will cause compilation warnings telling the user that the function is deprecated. You can add to the deprecation warning message (for example, to provide instructions on replacing the deprecated function) using the `DeprecationMessage` metadata specifier.

#### Examples

```cpp
UFUNCTION(BlueprintPure)
int32 BlueprintPureFunction();

UFUNCTION(BlueprintCallable)
int32 BlueprintCallableFunction();

UFUNCTION(BlueprintCallable)
int32 BlueprintCallableConstFunction() const;

UFUNCTION(BlueprintPure=false)
int32 BlueprintPureFalseFunction() const;
```

```cpp
UFUNCTION(BlueprintCallable, Category = "Doggy Daycare", meta=(ReturnDisplayName = "Success"))
bool TryPetDog(const FName Name);
```

You can read more about [UPROPERTY by BenUi](https://benui.ca/unreal/ufunction/).

### UCLASS

`UCLASS` is a macro used to declare a class that is intended to be used in Unreal Engine's reflection system. It allows the class to be instantiated, exposed to Blueprint, and used in various engine systems.

#### Common Specifiers

- `Blueprintable`: Allows the class to be used as a blueprint in the editor.

- `BlueprintType`: Specifies that the class can be instantiated and manipulated in Blueprint scripts.

- `Abstract`: Indicates that the class is an abstract class and cannot be instantiated directly.

- `Transient`: Excludes the class from being serialized and saved in the game's persistent data.

- `MinimalAPI`: Restricts the class's visibility for export, making it more suitable for engine internal use.

- `NotBlueprintType`: Prevents the class from being used as a blueprint.

#### Common Meta tags

- `DisplayName`: Sets a custom display name for the class in the editor.

- `ToolTip`: Provides a tooltip description for the class in the editor.

- `HideCategories`: Hides specific property categories from being displayed in the editor.

- `ClassGroup`: Assigns the class to a specific group in the editor's class picker.

- `IncludePath`: Specifies the include path for the generated code of the class.

- `BlueprintSpawnableComponent`: Marks a class derived from `USceneComponent` as spawnable in Blueprint.

#### Examples

```cpp
UCLASS(Blueprintable)
class MyActor : public AActor
{
GENERATED_BODY()

public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MyActor")
int32 MyIntProperty;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MyActor")
float MyFloatProperty;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MyActor")
FString MyStringProperty;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MyActor")
FMyStruct MyStructProperty;
};
```

You can read more about [UCLASS by BenUi](https://benui.ca/unreal/uclass/).

### USTRUCT

`USTRUCT` is a macro used to declare a C++ struct that is intended to be used in Unreal Engine's reflection system. It enables the struct to be used as a property within UCLASSes and exposed to Blueprint.

#### Common Specifiers

- `BlueprintType`: Specifies that the structure can be used in Blueprint scripts.

- `Atomic`: Ensures that the structure is treated as an atomic type for replication in multiplayer games.

- `NotReplicated`: Excludes the structure from being replicated across the network.

#### Common Meta tags

- `DisplayName`: Sets a custom display name for the structure in the editor.

- `ToolTip`: Provides a tooltip description for the structure in the editor.

- `Category`: Specifies the category in which the structure will appear in the editor.

#### Examples

```cpp
USTRUCT(BlueprintType)
struct FMyStruct
{
GENERATED_BODY()

UPROPERTY(BlueprintReadWrite, Category = "MyStruct")
int32 Value1;

UPROPERTY(BlueprintReadWrite, Category = "MyStruct")
FString Value2;
};
```

You can read more about [USTRUCT by BenUi](https://benui.ca/unreal/ustruct/).

### UENUM

`UENUM` is a macro used to declare an enumeration that is intended to be used in Unreal Engine's reflection system. It allows the enumeration to be exposed to Blueprint and used within `UCLASS`es.

#### Common Specifiers

- `BlueprintType`: Specifies that the enumeration can be used in Blueprint scripts.

- `DisplayNames`: Specifies a list of custom display names for each enumeration value in the editor.

#### Common Meta tags

- `DisplayName`: Sets a custom display name for the enumeration in the editor.

- `ToolTip`: Provides a tooltip description for the enumeration in the editor.

- `Hidden`: Hides the enumeration from being displayed in the editor.

- `Bitflags`: Indicates that the enumeration represents a set of bit flags.

- `EnumRange`: Specifies the minimum and maximum values for the enumeration.

#### Examples

```cpp
UENUM(BlueprintType)
enum class EWeaponType
{
Sword UMETA(DisplayName = "Sword Weapon"),
Axe UMETA(DisplayName = "Axe Weapon"),
Bow UMETA(DisplayName = "Bow Weapon"),
Wand UMETA(DisplayName = "Magic Wand"),
};
```

You can read more about [UENUM by BenUi](https://benui.ca/unreal/uenum/).

### UPARAM

`UPARAM` is a macro used to provide additional information to the Unreal Header Tool. It is used with parameters of UFUNCTION and UPROPERTY to specify how the engine should handle the data.

- `UPARAM(Ref)`: Used to mark a parameter that is passed by reference. It ensures that the parameter is treated as a reference during code generation, which may affect how the engine handles the parameter.

- `UPARAM(DisplayName)`: Used to set a custom display name for a function parameter when it appears in the editor's Blueprint node graph.

- `UPARAM(BlueprintCallable, BlueprintPure)`: Used to apply multiple specifiers to a function parameter. For example, to mark a parameter as both BlueprintCallable and BlueprintPure.

- `UPARAM(meta = (CustomMetaTag))`: Allows developers to create custom meta tags and use them in function parameters to provide additional information to the Unreal Header Tool.

#### Examples

```cpp
UCLASS()
class MyActor : public AActor
{
GENERATED_BODY()

public:
// A function that takes a parameter passed by reference
UFUNCTION(BlueprintCallable, Category = "MyActor")
void ModifyValue(UPARAM(Ref) int32& ValueToModify)
{
// Modify the value passed by reference
ValueToModify *= 2;
}
};
```

You can read more about [UPARAM by BenUi](https://benui.ca/unreal/uparam/).

### UMETA

`UMETA` is a macro used to specify additional metadata for an UENUM entry. It allows adding custom information to enum values for use in Blueprint, UI, and other engine systems.

#### Common Specifiers

- `DisplayName`: Sets a custom display name for the enumeration value in the editor.

- `ToolTip`: Provides a tooltip description for the enumeration value in the editor.

- `Hidden`: Hides the enumeration value from being displayed in the editor.

- `DisplayPriority`: Specifies the display priority for the enumeration value in the editor.

- `DisplayThumbnail`: Allows attaching a custom thumbnail image to the enumeration value in the editor.

- `CustomMetaData`: Specifies custom metadata that developers can define and use as needed.

#### Examples

```cpp
UENUM(BlueprintType)
enum class EMyEnum
{
Value1 UMETA(DisplayName = "First Value", ToolTip = "This is the first value"),
Value2 UMETA(DisplayName = "Second Value", ToolTip = "This is the second value"),
Value3 UMETA(Hidden),
};
```

You can read more about [UMETA by BenUi](https://benui.ca/unreal/umeta/).

## 🧱 Data Types

This section was written in conjunction with ChatGPT.

![Data types](static/img/Data_types.png)

### Characters

In C++ native, you write a character by using `char` data type:

```cpp
char myChar = 'a';
```

In Unreal, there are couples or `char` data types:

* `ANSICHAR` - An ANSI character. Normally a signed type.
* `WIDECHAR` - A wide character. Normally a signed type.
* `TCHAR` - Either `ANSICHAR` or `WIDECHAR`, depending on whether the platform supports wide characters or the requirements of the licensee.
* `UTF8CHAR` - An 8-bit character containing a UTF8 (Unicode, 8-bit, variable-width) code unit.
* `UTF16CHAR` - An 16-bit character containing a UTF16 (Unicode, 16-bit, variable-width) code unit.
* `UTF32CHAR` - An 32-bit character containing a UTF32 (Unicode, 32-bit, fixed-width) code unit.

When working with Unreal, you are typical going to work with `TCHAR` data type as a `char` type.

Define `TCHAR`:

```cpp
TCHAR MyChar = 'A';
```

And to use the extra functions for these data types, you must use:

* `FChar` for `TCHAR`
* `FCharWide` for `WIDECHAR`
* `FCharAnsi` for `ANSICHAR`

Here's a list of functions, you can access from `FChar`:

* `ToUpper()` - Only converts ASCII characters.
* `ToLower()` - Only converts ASCII characters.
* `IsUpper()` - Returns a boolean if the character is an uppercase letter.
* `IsLower()` - Returns a boolean if the character is a lowercase letter.
* `IsAlpha()` - Returns a boolean if the character is an alphabetic letter.
* `IsGraph()` - Returns a boolean if the character is a graphic character (printable and not a space).
* `IsPrint()` - Returns a boolean if the character is a printable character (including whitespace).
* `IsPunct()` - Returns a boolean if the character is a punctuation character (neither alphanumeric nor a whitespace).
* `IsAlnum()` - Returns a boolean if the character is an alphanumeric character (a letter or a digit).
* `IsDigit()` - Returns a boolean if the character is a hexadecimal digit (0-9, a-f or A-f).
* `IsHexDigit()` - Returns a boolean if the character is a decimal digit (0-9).
* `IsWhitespace()` - Returns a boolean if the character is a whitespace character (space, tab, newline, carriage return, vertical tab or form feed).
* `IsControl()` - Returns a boolean if the character is a control character (non-printing).
* `IsOctDigit()` - Returns a boolean if the character is an octal digit (0-7).
* `ConvertCharDigitToInt()` - Converts a character representing a decimal digit to an integer.
* `IsIdentifier()` - Returns a boolean if the character is an alphanumeric or underscore character.
* `IsUnderscore()` - Returns a boolean if the character is an underscore.
* `ToUnsigned()` - Convert a character to an unsigned integer to avoid sign extension problems with signed characters smaller than `int`.

Include the header file:

```cpp
#include "Misc/Char.h"
```

Here's an example, of using these functions from `FChar`:

```cpp
TCHAR MyChar = 'a';

MyChar = FChar::ToUpper(MyChar); // MyChar: A

bool bIsDigit = FChar::IsDigit(MyChar); // false
bool bIsDigit = FChar::IsAlpha(MyChar); // true
```

You can read more about [TCHAR on Unreal's docs](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Misc/TChar/).

### Booleans

```cpp
// Unreal uses a 'b' prefix for booleans (always in lowercase).
bool bIsDead = true;
```

### Integers

In C++ native, you write a integer by using `int` data type:

```cpp
int health = 10;
```

In Unreal, you write a integer by using `int32`:

```cpp
int32 Health = 10;
```

In Unreal, the availability of different integer types such as `int8`, `int16`, and `int64` alongside the standard `int32` provides developers with a range of options tailored to specific needs in terms of both data size and numerical range.

```cpp
int8 NumberA = 0; // -128 -> 127
int16 NumberB = 0; // -32,768 -> 32,767
int32 NumberC = 0; // -2,147,483,648 -> 2,147,483,647
int64 NumberD = 0; // 9,223,372,036,854,775,808 -> 9,223,372,036,854,775,807
```

You also have unsigned (positive-only) integers as well:

```cpp
uint8 NumberA = 0; // 0 -> 255
uint16 NumberB = 0; // 0 -> 65,535
uint32 NumberC = 0; // 0 -> 4,294,967,295
uint64 NumberD = 0; // 0 -> 18,446,744,073,709,551,615
```

### Floating point numbers

```cpp
// C++ always uses 'f' or 'F' literal for defining a float variable.
float SpeedInMetersPerSecond = 5.5f;
```

```cpp
// C++ never uses a literal for defining a double variable.
double SpeedInMetersPerSecond = 5.5;
```

### πŸ›Ÿ Size can vary

It is generally recommended to use Unreal's typedefs, such as `int32` instead of `int` for representing 32-bit signed integers. This is because the exact size of `int` is not defined by the C++ standard.

C++ implementation can define the size of a data type in bytes (`sizeof(type)`) to be any value, as long as:

* The expression `sizeof(type) * CHAR_BIT` evaluates to a number of bits high enough to contain required ranges.
* And the ordering of type is still valid (e.g. `sizeof(int) <= sizeof(long)`).

The `CHAR_BIT` is the number of bits in char. It is declared in β€œlimits.h” header file in C++ language. It is of 8-bits per byte.

You can read more about data ranges in this [section](#-data-types).

So, the summary data sizes would be:

* `char`, `signed char` and `unsigned char` are at least 8 bits

* `signed short`, `unsigned short`, `signed int` and `unsigned int` are at least 16 bits

* `signed long` and `unsigned long` are at least 32 bits

* `signed long long` and `unsigned long long` are at least 64 bits

You can read more in-depth about this from [Alex on Stack Overflow](https://stackoverflow.com/a/589684/17067030).

---

Here's a full list of Unreal's data type sizes:

| Data Type | Signed | Size (bytes) |
| --------- | ------ | ------------ |
| `bool` | - | NEVER assume the size |
| `TCHAR` | - | NEVER assume the size |
| `uint8` | false | 1 |
| `int8` | true | 1 |
| `uint16` | false | 2 |
| `int16` | true | 2 |
| `uint32` | false | 4 |
| `int32` | true | 4 |
| `uint64` | false | 8 |
| `int64` | true | 8 |
| `float` | true | 4 |
| `double` | true | 8 |

### 🦺 Unreal Engine Typedefs

In Unreal Engine, instead of writing `signed long long` for a 64-bit integer, you can now write `int64` instead. These aliases are called **typedefs**, which you can read more about [typedef keyword in C++ docs](https://en.cppreference.com/w/cpp/language/typedef).

You can read more about C++ typedefs in [this section](#typedefs).

Here is a full list of Unreal Engine's typedefs:

```cpp
//~ Unsigned base types.
/// An 8-bit unsigned integer.
typedef FPlatformTypes::uint8 uint8;
/// A 16-bit unsigned integer.
typedef FPlatformTypes::uint16 uint16;
/// A 32-bit unsigned integer.
typedef FPlatformTypes::uint32 uint32;
/// A 64-bit unsigned integer.
typedef FPlatformTypes::uint64 uint64;

//~ Signed base types.
/// An 8-bit signed integer.
typedef FPlatformTypes::int8 int8;
/// A 16-bit signed integer.
typedef FPlatformTypes::int16 int16;
/// A 32-bit signed integer.
typedef FPlatformTypes::int32 int32;
/// A 64-bit signed integer.
typedef FPlatformTypes::int64 int64;

//~ Character types.
/// An ANSI character. Normally a signed type.
typedef FPlatformTypes::ANSICHAR ANSICHAR;
/// A wide character. Normally a signed type.
typedef FPlatformTypes::WIDECHAR WIDECHAR;
/// Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requirements of the licensee.
typedef FPlatformTypes::TCHAR TCHAR;
/// An 8-bit character containing a UTF8 (Unicode, 8-bit, variable-width) code unit.
typedef FPlatformTypes::UTF8CHAR UTF8CHAR;
/// A 16-bit character containing a UCS2 (Unicode, 16-bit, fixed-width) code unit, used for compatibility with 'Windows TCHAR' across multiple platforms.
typedef FPlatformTypes::CHAR16 UCS2CHAR;
/// A 16-bit character containing a UTF16 (Unicode, 16-bit, variable-width) code unit.
typedef FPlatformTypes::CHAR16 UTF16CHAR;
/// A 32-bit character containing a UTF32 (Unicode, 32-bit, fixed-width) code unit.
typedef FPlatformTypes::CHAR32 UTF32CHAR;

/// An unsigned integer the same size as a pointer
typedef FPlatformTypes::UPTRINT UPTRINT;
/// A signed integer the same size as a pointer
typedef FPlatformTypes::PTRINT PTRINT;
/// An unsigned integer the same size as a pointer, the same as UPTRINT
typedef FPlatformTypes::SIZE_T SIZE_T;
/// An integer the same size as a pointer, the same as PTRINT
typedef FPlatformTypes::SSIZE_T SSIZE_T;

/// The type of the NULL constant.
typedef FPlatformTypes::TYPE_OF_NULL TYPE_OF_NULL;
/// The type of the C++ nullptr keyword.
typedef FPlatformTypes::TYPE_OF_NULLPTR TYPE_OF_NULLPTR;
```

> [!WARNING]
> `uint16`, `uint32`, `uint64`, `int8`, `int16` and `double` are not supported with UHT[^2]. Meaning, can't expose to Blueprint.

### πŸ“– String Data Types

String in programming languages are fundamental data types used to represent and manipulate sequences of characters, such as words, sentences, or even binary data. They are extensively used in various programming tasks, including input/output operations, text processing, data serialization, and more.

In Unreal Engine, strings play a crucial role in handling text-based information within the game or application. Unreal Engine provides several string-related classes to cater to different use cases and requirements.

You can read more about [string handling from the docs](https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/StringHandling/).

### Text Macros

* `TEXT` - This macro is used for specifying wide-character (UTF-16) encoding. This makes the string literal platform independent. Without this macro, you are using ANSI encoding (which can cause issues on other machines).

* `INVTEXT` - This macro is calling FText::AsCultureInvariant(TEXT(InTextLiteral)) with InTextLiteral as parameter. Helpful creating culture invariant FText from the given string literal.

* `LOCTEXT` - This macro is used to create `FText` literals specifically for localization. It takes a namespace and a key to identify the localized string.

#### FName

In Unreal Engine, `FName` is a specialized type used for identifying objects within the Unreal Engine object system. It is optimized for fast comparison and storage and is commonly used for referencing actors, components, or assets in a performance-efficient manner.

The `FName` class stores strings as hashed indices, making it a lightweight and fast alternative to regular strings. Because of this, `FName` are **immutable** string class.

**Here's an example:**

Include the header file:

```cpp
#include "UObject/NameTypes.h"
```

Declare `FName`:

```cpp
FName MyName = FName(TEXT("PlayerName"));
```

#### FText

This section was NOT written in conjunction with ChatGPT.

`FText` is a specialized string class designed for localization support in Unreal Engine. Because of this, `FText` are **immutable** string class. FText provides the abili