CodeForge
Visual C++ Code Generator for Unreal Engine 5
Design classes, structs, enums, and interfaces in a node-based editor. CodeForge generates UHT-compliant C++ boilerplate instantly — with replication, RPCs, delegates, and more.
v0.1.0 · UE 5.71 Overview
CodeForge is an editor plugin that lets you define Unreal Engine C++ classes, structs, enums, and interfaces visually — then generates complete, compile-ready header and source files. Instead of hand-writing UPROPERTY/UFUNCTION macros, specifier strings, and replication boilerplate, you configure them through a node graph and a details panel, and CodeForge emits correct C++ instantly.
2 Installation
From Source or Fab
Once you acquire CodeForge, ensure it is placed in your project's Plugins/ directory. Here is the expected structure:
- Regenerate project files (right-click your
.uproject→ Generate Visual Studio project files). - Compile and open the editor. CodeForge loads automatically — check Edit → Plugins to verify.
"EngineVersion": "5.7.0" in its descriptor and uses BuildSettingsVersion.V6.3 Quick Start
Generating your first class takes less than a minute:
- Create Asset: In Content Browser, right-click → CodeForge → CodeForge Blueprint.
- Open Editor: Double-click the asset to open the visual graph.
- Configure: In the Details panel, choose
Class, set ClassName (e.g.,MyCharacter), and ClassType. - Design: Right-click the graph to add Properties, Functions, or RPC nodes and connect them.
- Generate: Click the Generate Code toolbar button.
4 Architecture
CodeForge is organized into distinct layers, ensuring that data, templates, and UI remain fully decoupled:
| Layer | Module | Key Classes |
|---|---|---|
| 1. Data Model | CodeForgeRuntime | UCodeForgeBlueprint, FCodeForgePropertyDef, etc. |
| 2. Template Engine | CodeForgeRuntime | FCodeForgeTemplateEngine, FCodeForgeTemplateContext |
| 3. Code Generator | CodeForgeEditor | FCodeForgeGenerator, Template file loading |
| 4. Editor UI | CodeForgeEditor | FCodeForgeAssetEditor, SGraphNode_CodeForge |
5 CodeForge Blueprints
A CodeForge Blueprint (UCodeForgeBlueprint) is the root data asset that stores your entire type definition. It lives in the Runtime module and is a pure data object.
Class Prefix System
CodeForge automatically prepends the correct UE prefix based on the type. If you accidentally type ARPGCharacter, the heuristic prevents double-prefixing it to AARPGCharacter.
| Kind | Prefix | Example Input | Generated Name |
|---|---|---|---|
| Actor-derived Class | A | MyCharacter | AMyCharacter |
| UObject-derived Class | U | MySubsystem | UMySubsystem |
| Struct | F | ItemData | FItemData |
| Enum | E | ItemRarity | EItemRarity |
| Interface | U / I | Damageable | UDamageable / IDamageable |
6 The Node Graph
CodeForge utilizes a heavily customized visual node graph. The central type node connects to various member nodes.
7 Code Generation
The code generation pipeline converts your node graph into a structured context dictionary, which is then fed into Handlebars-style templates (.cft files) to produce the final C++ strings.
8 Classes
The most feature-rich blueprint kind. Supports properties, functions, RPCs, delegates, and replication.
Properties
Each Property node generates a UPROPERTY() macro. Specifiers like EditAnywhere, BlueprintReadWrite, and ReplicatedUsing are automatically derived from checkboxes.
UPROPERTY(EditAnywhere, BlueprintReadWrite, ReplicatedUsing=OnRep_Health)
float Health = 100.0f;
Functions & RPCs
Generate pure getters, callable events, and full client/server/multicast RPCs complete with _Implementation and _Validate stubs where required by UE5 conventions.
// Header
UFUNCTION(Server, Reliable, WithValidation)
void ServerRequestAttack();
// Source — _Implementation
void AMyCharacter::ServerRequestAttack_Implementation()
{
// TODO
}
// Source — _Validate
bool AMyCharacter::ServerRequestAttack_Validate()
{
return true;
}
Replication
Checking bReplicated on the root node auto-generates the GetLifetimeReplicatedProps override, network includes, and constructor flags (differentiating between Actor bReplicates and Component SetIsReplicatedByDefault).
9 Structs, Enums & Interfaces
Generates a USTRUCT(BlueprintType). Struct properties cannot have replication flags (caught by Validator Rule 12).
Generates a UENUM(BlueprintType) with uint8 backing type and optional UMETA(DisplayName) metadata.
Generates the standard UE5 dual-class pattern: a UINTERFACE stub and an I-prefixed abstract class filled with BlueprintNativeEvent functions.
10 Asset Editor
Double-clicking a CodeForge Blueprint opens the CodeForge Asset Editor (FCodeForgeAssetEditor), a custom standalone editor with:
- Node Graph Panel (left): The visual node graph for designing your type.
- Code Preview Panel (right): Real-time display of the generated
.hand.cppcode. - Details Panel (bottom-right): Standard UE5 property editor for the selected node or blueprint.
- Toolbar: Buttons for Generate Code, Validate, and toggling the code preview.
Code Preview
The code preview panel updates in real time as you modify properties in the Details panel. It shows two tabs:
UCLASS()
class MYGAME_API AMyCharacter : public ACharacter
{
GENERATED_BODY()
// Updates live as nodes change!
};
11 Node Visuals
CodeForge uses a custom SGraphNode_CodeForge widget with enhanced visual features:
- Color-coded title bars — each node type has a distinct color.
- Validation badges — error and warning indicators appear directly on nodes in real time.
- Body tinting — type nodes get a subtle color tint.
- Configurable font sizes — separate sizes for type nodes and member nodes.
12 Validation & Auto-Fix
CodeForge validates your design in real time to prevent C++ compilation errors.
| Rule | Severity | Description | Auto-Fix |
|---|---|---|---|
| 1 | Error | Duplicate member names within the same class/struct | — |
| 2 | Error | Conflicting specifiers: BlueprintReadWrite + BlueprintReadOnly | — |
| 5 | Error | Member name uses a reserved UE name (Class, Super) | — |
| 8 | Error | RepNotify set but Replicated is false | Yes |
| 9 | Warning | Bool property not prefixed with b (e.g., bIsAlive) | Yes |
| 12 | Error | Replication flags set on a struct property | Yes |
13 Template Engine & Customization
CodeForge uses .cft files located in Plugins/CodeForge/Content/Templates/. It uses a Handlebars-like syntax.
| Syntax | Description |
|---|---|
{{Var}} | Replaced with variable |
{{#if Cond}}...{{/if}} | Renders if true |
{{#each Array}}...{{/each}} | Loops over items |
{{> partial}} | Includes another template |
CustomTemplatePath in Project Settings to use your own templates without modifying the plugin files.14 Module Scanner
FCodeForgeModuleScanner automatically discovers all C++ modules in your project by scanning for .Build.cs files. For each module it determines:
- ModuleName — parsed from the
.Build.csfilename - APIMacro — derived as
MODULENAME_API(uppercase module name +_API) - SourceDir, PublicDir, PrivateDir — standard UE module directory layout
This powers the ModuleTarget dropdown in the blueprint editor, letting you pick any module in your project as the output target without manual configuration.
15 Auto-Fix System
Several validation rules offer automatic fixes via ApplyAutoFix(AutoFixId). When a validation result has a non-empty AutoFixId, the editor can apply the fix with one click.
| AutoFixId Pattern | Action |
|---|---|
FixClassPrefix:X | Prepend the correct prefix character to ClassName |
FixBoolPrefix:PropName | Rename property to bPropName (with capitalized first letter) |
EnableReplicated:PropName | Set bReplicated = true on the property |
RemoveReplicationFlags:PropName | Clear replication flags from struct property |
FixType:Field:CorrectedType | Replace a miscapitalized type (e.g., Float → float) |
16 Enums Reference
ECodeForgeBlueprintKind
ClassStructEnumInterface
ECodeForgeRPCMode
ServerClientNetMulticast
ECodeForgeDelegateType
DynamicMulticastDynamicMulticastSimple
ECodeForgeValidationSeverity
ErrorWarning
ECodeForgeClassType
Actor | Pawn | Character | ActorComponent |
SceneComponent | Object | GameModeBase | GameStateBase |
PlayerController | PlayerState | HUD |
ECodeForgeRepCondition
None | InitialOnly | OwnerOnly | SkipOwner |
SimulatedOnly | AutonomousOnly | SimulatedOrPhysics | InitialOrOwner |
Custom | ReplayOrOwner | ReplayOnly | SimulatedOnlyNoReplay |
SimulatedOrPhysicsNoReplay | SkipReplay | Dynamic | Never |
17 Specifier Builder Reference
Each definition type has a BuildSpecifierString() method that generates the correct UE5 macro arguments. Here's how specifiers combine:
Property Specifier Priority
Edit specifiers are mutually exclusive (first true wins):
VisibleAnywhere > EditAnywhere > EditDefaultsOnly > EditInstanceOnly
Blueprint specifiers are mutually exclusive:
BlueprintReadWrite > BlueprintReadOnly
Replication: RepNotify takes priority over plain Replicated — generates ReplicatedUsing=OnRep_Name.
Function Specifier Priority
Exec > BlueprintPure > BlueprintCallable
BlueprintNativeEvent is additive (can combine with the above). Category is appended when non-empty.
Type Correction Map
The validator recognizes common miscapitalizations and suggests corrections:
| Input | Corrected | Input | Corrected |
|---|---|---|---|
Float | float | String | FString |
Bool | bool | Vector | FVector |
Int | int | fstring | FString |
Int32 | int32 | fvector | FVector |
Double | double | frotator | FRotator |
18 Troubleshooting
CodeForge prepends prefixes automatically. If you see this on an old file, regenerate it to pick up the updated logic. Ensure the ClassName field doesn't already contain a double-prefix.
If UnrealEditor-Cmd.exe holds DLLs, kill it or close the editor. If bAutoLiveCodingOnBehavioralChange is enabled, CodeForge will attempt to trigger Live Coding directly.
CodeForge v0.1.0 · Unreal Engine 5.7
Copyright © 2026 GregOrigin. All Rights Reserved.