C++ Generator
Documentation, guides, and technical support for C++ Generator in Unreal Engine.
Overview
Build faster, smarter, and easier with this snippet and boilerplate generator.
- UMacros Generator: Leverage 100+ unique specifiers to maximize Unreal Engine’s reflection system.
- AActor Generator: Streamline actor class hierarchies, auto-resolve module includes, and manage components with drag-and-drop.
- C++ Toolbox: Generate Enums, Structs, instant logging helpers, debug shapes, and engine-wide include lookups.
Launch the C++ Generator
If you don’t see the toolbar icon be sure to have the plugin enabled in Edit > Plugins > Installed
Once enabled, launch the C++ Generator from the editor toolbar to begin creating variables, functions, and actor hierarchies.
UMacros Tab: Create Variables and Functions
- Click the + button to create a new variable or function.
- Select the item and adjust its type and exposure settings.
- Apply the appropriate flags & specifiers.
- Copy the generated C++ code snippet.
- Paste it directly into your header (
.h) file.
The C++ generator manually translates each variable type, meaning the available options are currently limited. Below is the list of supported types—we’ll continue expanding it in future updates.
AActor Tab: Create Actor Hierarchies
Add components to your actor:
- Click + Add to add a new component.
- Select the component to configure its hierarchy and attachment.
- Reorganize components via drag and drop. (Scene Components can be nested; Pure Actor Components attach to root.)
Integrate custom C++ components:
- Compile your component from your code editor (IDE).
- Restart Unreal Engine and C++ Generator to populate custom components (must have
BlueprintSpawnableComponent).
C++ Toolbox Suite
C++ Toolbox Suite
Flags and Specifiers
Unreal Engine uses reflection macros to expose classes, properties, functions, enums, and structs to the editor and Blueprints:
UCLASS,UPROPERTY,UFUNCTION,UENUM,USTRUCT
Each macro supports specifiers that dictate serialization, network replication, category sorting, and Blueprint accessibility.
- 🛠️ C++ Generator provides 100+ unique specifiers with interactive tooltips.
- ⚠️ Some flags require additional functions and won’t compile until all dependencies are met.
UCLASS Specifiers
- Blueprintable: Allows the creation of a Blueprint class that inherits from this class.
- BlueprintType: Allows creating variables in Blueprints with this type in the editor.
- Abstract: Makes the class abstract (non-instantiable in the level).
- EditInLineNew: Assigning a reference of this class type in the editor creates a new instance (instead of just referencing an existing instance or asset).
UPROPERTY Specifiers
UFUNCTION Specifiers
Want to know more about all specifiers & flags? Check out Ben UI’s UPROPERTY Reference Guide.
Compilation Workflows
Compiling from Code Editor (Recommended):
- Close Unreal Engine.
- In Visual Studio press Ctrl + Shift + B (or in Rider click Build).
- Restart Unreal Engine to load updated binaries.
Hot Compile / Live Coding (Fast Iteration):
- Save code modifications in your IDE.
- Press Compile / Ctrl + Alt + F11 inside Unreal Engine.
- Best for method logic changes; structural changes require an editor restart.
C++ Modules Configuration
Unreal Engine encapsulates functionality into discrete compilation modules. When using types from external modules (e.g. Niagara, EnhancedInput, UMG), you must declare module dependencies in your Build.cs.
Adding a module:
- Copy the module name identified by C++ Generator.
- Add the module to
PublicDependencyModuleNamesin your[Project].Build.cs. - Regenerate project files and build.
Regenerating the C++ Project
If properties or functions don’t appear in the editor after compilation, UE’s reflection database may need a refresh:
- Check Output Log for syntax errors or unresolved includes.
- In Unreal Engine: Tools > Refresh Visual Studio Project (or Refresh Rider Project).
- Close Unreal Engine and perform a clean build from your IDE.
- Emergency Fix: Run RegenerateCPP.bat from the Ciji UE-Toolbox repository to force clean intermediate files and project bindings.