GET ON FAB

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

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

Node-Based Design
Visual graph editor with typed nodes for classes, properties, functions, RPCs, delegates, and more.
Instant Code Generation
Generates .h and .cpp files with correct UHT macros, class prefixes, includes, and GENERATED_BODY().
Real-Time Validation
13+ validation rules catch errors before you compile — duplicate names, bad types, missing prefixes, and more.
Full UE5 Feature Coverage
Replication, RepNotify, RPCs, delegates, interfaces, Exec commands, meta specifiers, and custom templates.

2 Installation

From Fab

  1. Purchase and download CodeForge from fab.com.
  2. Extract the zip. You will find HostProject/Plugins/CodeForge/.
  3. Copy the CodeForge folder into your project's Plugins/ directory.
  4. Regenerate project files (right-click your .uprojectGenerate Visual Studio project files).
  5. Open the editor. CodeForge loads automatically — check Edit → Plugins to verify.

From Source

Clone the repository into YourProject/Plugins/CodeForge. The plugin has two modules:

ModuleTypeLoading PhasePurpose
CodeForgeRuntimeRuntimeDefaultBlueprint data model, template engine, validation
CodeForgeEditorEditorPostEngineInitGraph editor, code generator, asset actions
i
Engine Version: CodeForge targets Unreal Engine 5.7. The plugin sets "EngineVersion": "5.7.0" in its descriptor and uses BuildSettingsVersion.V6.

3 Quick Start

  1. Create a CodeForge Blueprint: In the Content Browser, right-click → CodeForge → CodeForge Blueprint. Name it (e.g., CFB_PlayerCharacter).
  2. Open the editor: Double-click the asset. The CodeForge Asset Editor opens with a node graph on the left and a code preview panel on the right.
  3. Set Blueprint Kind: In the Details panel, choose Class, Struct, Enum, or Interface.
  4. Configure identity: Set ClassName (e.g., MyCharacter), ClassType (e.g., Character), and ModuleTarget.
  5. Add members: Right-click the graph → add Property, Function, RPC, or Delegate nodes. Configure each in the Details panel.
  6. Review the preview: The code preview panel shows the generated .h and .cpp in real time.
  7. Generate: Click the Generate Code toolbar button. Files are written to your module's Source directory.
Workflow Overview
Create Asset Design in Graph Validate Generate C++

4 Architecture

CodeForge is organized into distinct layers, each with a single responsibility:

Layered Architecture
LAYER 4 — EDITOR UI SGraphNode_CodeForge • CodeForgeAssetEditor • CodeForgeNodeFactory LAYER 3 — CODE GENERATOR CodeForgeGenerator • BuildContext() • Template Loading LAYER 2 — TEMPLATE ENGINE FCodeForgeTemplateEngine • {{variables}} • {{#if}} • {{#each}} • {{> includes}} LAYER 1 — DATA MODEL (RUNTIME) UCodeForgeBlueprint • PropertyDef • FunctionDef • RPCDef • DelegateDef • EnumDef
LayerModuleKey Classes
Data ModelCodeForgeRuntimeUCodeForgeBlueprint, FCodeForgePropertyDef, FCodeForgeFunctionDef, FCodeForgeRPCDef, FCodeForgeDelegateDef
Template EngineCodeForgeRuntimeFCodeForgeTemplateEngine, FCodeForgeTemplateContext
Code GeneratorCodeForgeEditorFCodeForgeGenerator::BuildContext(), Template file loading
Editor UICodeForgeEditorFCodeForgeAssetEditor, SGraphNode_CodeForge, UCodeForgeEdGraph

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 — no UI logic, no code generation. This means it can be loaded and inspected in any context.

Core Properties

PropertyTypeDescription
ClassNameFStringThe C++ type name (without prefix — CodeForge adds A/U/F/E automatically)
BlueprintKindECodeForgeBlueprintKindClass, Struct, Enum, or Interface
ClassTypeECodeForgeClassTypeParent class (Actor, Pawn, Character, etc.) — only relevant for Classes
bReplicatedboolEnable replication setup (bReplicates, GetLifetimeReplicatedProps)
ModuleTargetFStringTarget module for generated files (auto-detected from project)
SubDirectoryFStringOptional sub-directory under Public/Private folders
InterfacesTArray<FString>Interface names to implement (without I/U prefix)
ConstructorBodyFStringCustom code injected into the constructor body

Class Prefix System

CodeForge automatically prepends the correct UE prefix based on the type:

KindPrefixExample InputGenerated Name
Actor-derived ClassAMyCharacterAMyCharacter
UObject-derived ClassUMySubsystemUMySubsystem
StructFItemDataFItemData
EnumEItemRarityEItemRarity
InterfaceU/IDamageableUDamageable / IDamageable
Smart detection: If you type ARPGCharacter (already prefixed with A + uppercase letter), CodeForge won't double-prefix it to AARPGCharacter. The prefix detection heuristic checks if the name already starts with the expected prefix character followed by an uppercase letter.

6 The Node Graph

Each CodeForge Blueprint has a visual node graph (UCodeForgeEdGraph) managed by UCodeForgeEdGraphSchema. The central type node (Class, Struct, Enum, or Interface) represents the type itself, and member nodes connect to it representing properties, functions, RPCs, and delegates.

Node Types

Class
Struct
Enum
Interface
Property
Function
RPC
Delegate

Graph Interactions

7 Code Generation

Code generation is handled by FCodeForgeGenerator. The process has three phases:

Generation Pipeline
PHASE 1 BuildContext(Blueprint) PHASE 2 Load .cft Templates PHASE 3 TemplateEngine.Process()

Phase 1 — BuildContext()

Reads the UCodeForgeBlueprint and populates a FCodeForgeTemplateContext with:

Phase 2 — Template Selection

Based on BlueprintKind and ClassType, the generator selects the appropriate .cft template pair:

KindHeader TemplateSource Template
Actor / Pawn / Character / GameMode / etc.actor_header.cftactor_source.cft
ActorComponent / SceneComponentcomponent_header.cftcomponent_source.cft
Objectobject_header.cftobject_source.cft
Interfaceinterface_header.cftinterface_source.cft
Structstruct_header.cftstruct_source.cft
Enumenum_header.cft

Phase 3 — Template Processing

The FCodeForgeTemplateEngine processes the template text with the context and returns the final C++ output. See the Template Engine section for syntax details.

8 Classes

The most feature-rich blueprint kind. Supports all member types: properties, functions, RPCs, delegates, replication, and interface implementation.

Supported Class Types

ClassTypeParent ClassInclude PathPrefix
ActorAActorGameFramework/Actor.hA
PawnAPawnGameFramework/Pawn.hA
CharacterACharacterGameFramework/Character.hA
ActorComponentUActorComponentComponents/ActorComponent.hU
SceneComponentUSceneComponentComponents/SceneComponent.hU
ObjectUObjectUObject/NoExportTypes.hU
GameModeBaseAGameModeBaseGameFramework/GameModeBase.hA
GameStateBaseAGameStateBaseGameFramework/GameStateBase.hA
PlayerControllerAPlayerControllerGameFramework/PlayerController.hA
PlayerStateAPlayerStateGameFramework/PlayerState.hA
HUDAHUDGameFramework/HUD.hA

Properties

Each FCodeForgePropertyDef generates a UPROPERTY() declaration. Available specifiers:

FieldTypeGenerated Specifier
NameFStringVariable name
TypeFStringC++ type (e.g., float, FString, TArray<int32>)
DefaultValueFStringInitializer (e.g., 100.0f)
bEditAnywhereboolEditAnywhere
bEditDefaultsOnlyboolEditDefaultsOnly
bEditInstanceOnlyboolEditInstanceOnly
bVisibleAnywhereboolVisibleAnywhere
bBlueprintReadWriteboolBlueprintReadWrite
bBlueprintReadOnlyboolBlueprintReadOnly
bReplicatedboolReplicated or ReplicatedUsing=OnRep_X
bRepNotifyboolGenerates OnRep_ function
ReplicationConditionECodeForgeRepConditionDOREPLIFETIME_CONDITION macro parameter
bExposeOnSpawnboolExposeOnSpawn
bSaveGameboolSaveGame
CategoryFStringCategory="..."
MetaTMap<FString, FString>meta=(Key=Value, ...)
IncludePathFStringAdds an #include for custom types
Example Generated UPROPERTY
UPROPERTY(EditAnywhere, BlueprintReadWrite, ReplicatedUsing=OnRep_Health)
float Health = 100.0f;

Functions

Each FCodeForgeFunctionDef generates a UFUNCTION() declaration:

FieldDescription
NameFunction name
ReturnTypeC++ return type (default: void)
ParametersArray of FCodeForgeParamDef (Name, Type, bIsConst, bIsRef)
bBlueprintCallableGenerates BlueprintCallable
bBlueprintPureGenerates BlueprintPure (implies Callable)
bConstAppends const qualifier
bBlueprintNativeEventGenerates BlueprintNativeEvent + _Implementation in source
bExecGenerates Exec (console command)
FunctionBodyCustom body (empty → // TODO)
IncludePathAdds #include for custom return types
Example Generated Function
UFUNCTION(BlueprintPure)
float GetHealthPercent() const;

RPCs (Remote Procedure Calls)

Each FCodeForgeRPCDef generates a server, client, or multicast RPC:

FieldDescription
NameRPC function name
ModeServer, Client, or NetMulticast
bReliableReliable vs Unreliable delivery
ParametersArray of FCodeForgeParamDef
FunctionBodyBody for the _Implementation function
!
Server RPCs always include WithValidation per UE5 convention. CodeForge automatically generates both _Implementation and _Validate (returning true) for Server RPCs.
Example Generated RPC
// Header
UFUNCTION(Server, Reliable, WithValidation)
void ServerRequestAttack();

// Source — _Implementation
void AMyCharacter::ServerRequestAttack_Implementation()
{
    // TODO
}

// Source — _Validate
bool AMyCharacter::ServerRequestAttack_Validate()
{
    return true;
}

Delegates

Each FCodeForgeDelegateDef generates a DECLARE_*_DELEGATE macro and a UPROPERTY(BlueprintAssignable) member:

DelegateTypeGenerated Macro
DynamicMulticastDECLARE_DYNAMIC_MULTICAST_DELEGATE_*Params
DynamicDECLARE_DYNAMIC_DELEGATE_*Params
MulticastDECLARE_MULTICAST_DELEGATE_*Params
SimpleDECLARE_DELEGATE_*Params

The parameter count suffix is computed automatically: _OneParam, _TwoParams, ..., up to _NineParams (UE5 maximum).

Example Generated Delegate
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnHealthChanged, float, NewHealth, float, MaxHealth);

UPROPERTY(BlueprintAssignable, Category = "Events")
FOnHealthChanged OnHealthChanged;

Replication

When bReplicated is true on the blueprint, CodeForge generates the full replication setup:

Actor Replication Setup
Component Replication Setup

Replication Conditions

Each replicated property can specify a condition via ECodeForgeRepCondition:

ConditionCOND_ MacroDescription
NoneCOND_NoneAlways replicate
InitialOnlyCOND_InitialOnlyOnly on initial replication
OwnerOnlyCOND_OwnerOnlyOnly to owning client
SkipOwnerCOND_SkipOwnerAll clients except owner
SimulatedOnlyCOND_SimulatedOnlyOnly simulated proxies
AutonomousOnlyCOND_AutonomousOnlyOnly autonomous proxy
SimulatedOrPhysicsCOND_SimulatedOrPhysicsSimulated or physics-simulating
InitialOrOwnerCOND_InitialOrOwnerInitial replication or to owner
CustomCOND_CustomCustom condition callback
NeverCOND_NeverNever replicate (skip)

(Plus ReplayOrOwner, ReplayOnly, SimulatedOnlyNoReplay, SimulatedOrPhysicsNoReplay, SkipReplay, Dynamic)

9 Structs

Struct blueprints generate a USTRUCT(BlueprintType) with a GENERATED_BODY() macro and property members. Structs use the F prefix.

Generated Struct Header
USTRUCT(BlueprintType)
struct MYMODULE_API FItemData
{
    GENERATED_BODY()

    UPROPERTY(EditAnywhere, BlueprintReadWrite)
    FString ItemName;

    UPROPERTY(EditAnywhere, BlueprintReadWrite)
    int32 StackCount = 1;
};
!
No replication on structs: Struct properties cannot have replication flags. The validator (Rule 12) catches this and offers an auto-fix to remove the flags.

10 Enums

Enum blueprints generate a UENUM(BlueprintType) with uint8 backing type and typed entries.

Entry FieldDescription
NameEntry name (e.g., Common)
DisplayNameOptional display name for Blueprint editors
ExplicitValueOptional integer value override
bHasExplicitValueWhether to emit the explicit value
bHiddenWhether to hide from Blueprint dropdowns
Generated Enum
UENUM(BlueprintType)
enum class EItemRarity : uint8
{
    Common,
    Uncommon,
    Rare,
    Epic,
    Legendary
};

11 Interfaces

Interface blueprints generate the standard UE5 dual-class interface pattern: a UINTERFACE stub class and an I-prefixed abstract class with BlueprintNativeEvent function declarations.

Generated Interface
UINTERFACE(MinimalAPI, Blueprintable)
class UDamageable : public UInterface
{
    GENERATED_BODY()
};

class MYMODULE_API IDamageable
{
    GENERATED_BODY()

public:
    UFUNCTION(BlueprintNativeEvent)
    void ReceiveDamage(float Amount);

    UFUNCTION(BlueprintNativeEvent)
    float GetCurrentHealth() const;
};
i
No virtual ... = 0: Unlike plain C++ abstract classes, UE5 BlueprintNativeEvent interface functions must not be declared virtual or = 0. CodeForge handles this correctly.

12 Asset Editor

Double-clicking a CodeForge Blueprint opens the CodeForge Asset Editor (FCodeForgeAssetEditor), a custom standalone editor with:

Code Preview

The code preview panel updates in real time as you modify properties in the Details panel. It shows two tabs:

13 Node Visuals

CodeForge uses a custom SGraphNode_CodeForge widget with enhanced visual features:

14 Plugin Settings

Access via Edit → Project Settings → Plugins → CodeForge (UCodeForgeSettings).

Code Generation

SettingDefaultDescription
DefaultModuleTarget(empty)Default module for new blueprints
DefaultSubDirectory(empty)Default sub-directory under Public/Private
CustomTemplatePath(empty)Override template directory (leave empty for defaults)
bAutoLiveCodingOnBehavioralChangetrueAuto-trigger Live Coding after behavioral changes

Editor

SettingDefaultDescription
bShowPreviewByDefaulttrueShow code preview panel in new editors
bShowToolbarButtontrueShow "Create CodeForge Blueprint" in level editor toolbar

Appearance — Node Colors

SettingDefault
ClassNodeColor(0.12, 0.28, 0.85)
StructNodeColor(0.10, 0.70, 0.25)
EnumNodeColor(0.85, 0.65, 0.00)
InterfaceNodeColor(0.00, 0.75, 0.85)
PropertyNodeColor(0.25, 0.80, 0.35)
FunctionNodeColor(0.90, 0.50, 0.00)
RPCNodeColor(0.90, 0.15, 0.15)
DelegateNodeColor(0.60, 0.25, 0.90)

Appearance — Branding

SettingDefaultDescription
BrandAccentColor(0.00, 0.72, 0.88)Top stripes, tab headers, highlights
BrandSecondaryColor(0.08, 0.14, 0.32)Watermarks and subtle highlights
NodeBodyBrightness0.055Node body darkness (0.01–0.2)
bTintTypeNodeBodiestrueColor tint on type node bodies
TypeNodeFontSize12Title font for type nodes (8–18)
MemberNodeFontSize10Title font for member nodes (8–16)

15 Template Engine

The FCodeForgeTemplateEngine is a dependency-free Handlebars-inspired string template processor. It supports four directives:

SyntaxNameDescription
{{VariableName}}Variable SubstitutionReplaced with the variable value from context
{{#if Condition}}...{{/if}}Conditional BlockRenders content only if condition is true
{{#if !Condition}}...{{/if}}Negated ConditionalRenders content only if condition is false
{{#each ArrayName}}...{{/each}}LoopRepeats content for each item in the array
{{> template_name}}Include / PartialIncludes another template file by name

Context Structure

struct FCodeForgeTemplateContext
{
    TMap<FString, FString>  Variables;    // {{Key}} → Value
    TMap<FString, bool>     Conditions;   // {{#if Key}}
    TMap<FString, TArray<FCodeForgeTemplateArrayItem>> Arrays; // {{#each Key}}
};

Template Example

{{> copyright_header}}

#pragma once

#include "CoreMinimal.h"
#include "{{ParentInclude}}"
{{#each AdditionalIncludes}}
#include "{{IncludePath}}"
{{/each}}
#include "{{ClassName}}.generated.h"

UCLASS({{ClassSpecifiers}})
class {{ModuleAPI}} {{ClassPrefix}}{{ClassName}} : public {{ParentClassName}}
{
    GENERATED_BODY()

{{#each Properties}}
    UPROPERTY({{PropertySpecifiers}})
    {{PropertyType}} {{PropertyName}}{{PropertyDefault}};

{{/each}}
};

Include Resolver

The template engine uses SetTemplateResolver() to resolve {{> name}} includes. CodeForge resolves templates from the Content/Templates/ directory hierarchy. The resolver supports a maximum recursion depth of 10 to prevent infinite loops.

16 Template Reference

All templates live in Plugins/CodeForge/Content/Templates/:

DirectoryFileDescription
Class/actor_header.cftHeader for AActor-derived classes
actor_source.cftSource for AActor-derived classes
component_header.cftHeader for UActorComponent/USceneComponent
component_source.cftSource for components
object_header.cftHeader for UObject-derived classes
object_source.cftSource for UObject-derived classes
interface_header.cftHeader for UINTERFACE classes
interface_source.cftSource stub for interfaces
Struct/struct_header.cftHeader for USTRUCT types
struct_source.cftSource for structs
Enum/enum_header.cftHeader for UENUM types
Common/copyright_header.cftCopyright notice partial (included via {{> copyright_header}})
Replication/replicated_props.cftGetLifetimeReplicatedProps body
rep_notify.cftOnRep_ function stub
Custom templates: Set CustomTemplatePath in Plugin Settings to override the built-in templates with your own. Great for project-specific coding conventions, comment styles, or additional boilerplate.

17 Validation Rules

CodeForge validates blueprints in real time through UCodeForgeBlueprint::Validate(). Each rule produces either an Error (blocks generation) or a Warning (advisory, with optional auto-fix).

RuleSeverityDescriptionAuto-Fix
1ErrorDuplicate member names within the same class/struct
2ErrorConflicting specifiers: BlueprintReadWrite + BlueprintReadOnly both set
3ErrorRPCs defined on a non-Actor-derived class
4ErrorMissing class name (ClassName is empty)
5ErrorMember name uses a reserved UE name (Class, Super, StaticClass)
6ErrorMember name uses a C++ keyword (delete, return, void, etc.)
7ErrorRPC has an empty name
8ErrorRepNotify set but Replicated is falseYes
9WarningBool property not prefixed with b (e.g., bIsAlive)Yes
10WarningClass has zero members (no properties, functions, RPCs, or delegates)
11WarningReplicated property on a non-Actor-derived class
12ErrorReplication flags set on a struct propertyYes
13WarningClass/struct/enum name missing expected prefix (A/U/F/E)Yes

Additional checks include: type validation (empty types, miscapitalized types like Floatfloat, invalid C++ type names), parameter validation (empty parameter names, bad types), delegate parameter count limit (max 9), and enum entry validation (duplicate entries, empty names, minimum 1 entry).

18 Module Scanner

FCodeForgeModuleScanner automatically discovers all C++ modules in your project by scanning for .Build.cs files. For each module it determines:

This powers the ModuleTarget dropdown in the blueprint editor, letting you pick any module in your project as the output target without manual configuration.

19 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 PatternAction
FixClassPrefix:XPrepend the correct prefix character to ClassName
FixBoolPrefix:PropNameRename property to bPropName (with capitalized first letter)
EnableReplicated:PropNameSet bReplicated = true on the property
RemoveReplicationFlags:PropNameClear replication flags from struct property
FixType:Field:CorrectedTypeReplace a miscapitalized type (e.g., Floatfloat)

20 Enums Reference

ECodeForgeBlueprintKind

ClassStructEnumInterface

ECodeForgeClassType

ActorPawnCharacterActorComponent
SceneComponentObjectGameModeBaseGameStateBase
PlayerControllerPlayerStateHUD

ECodeForgeRPCMode

ServerClientNetMulticast

ECodeForgeDelegateType

DynamicMulticastDynamicMulticastSimple

ECodeForgeRepCondition

NoneInitialOnlyOwnerOnlySkipOwner
SimulatedOnlyAutonomousOnlySimulatedOrPhysicsInitialOrOwner
CustomReplayOrOwnerReplayOnlySimulatedOnlyNoReplay
SimulatedOrPhysicsNoReplaySkipReplayDynamicNever

ECodeForgeValidationSeverity

ErrorWarning

21 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:

InputCorrectedInputCorrected
FloatfloatStringFString
BoolboolVectorFVector
IntintfstringFString
Int32int32fvectorFVector
DoubledoublefrotatorFRotator

22 Troubleshooting

UHT "Class name must start with A/U" error

CodeForge automatically prepends the correct prefix. If you see this error on previously generated files, regenerate to pick up the ClassPrefix fix. Ensure ClassName in the blueprint doesn't already include the prefix (CodeForge detects this and avoids double-prefixing).

Interface functions "cannot be virtual" error

BlueprintNativeEvent functions in a UINTERFACE must not be declared virtual or = 0. CodeForge's interface template generates these correctly. If you have old generated files, regenerate them.

DLL lock prevents rebuild

If UnrealEditor-Cmd.exe or the editor is holding DLLs, close the editor or kill the process before rebuilding. Live Coding can also update DLLs in-place if bAutoLiveCodingOnBehavioralChange is enabled.

ModuleTarget is empty / "No modules found"

Ensure your project has at least one C++ module with a .Build.cs file. CodeForge scans for these automatically via FCodeForgeModuleScanner. Check Project Settings → CodeForge → DefaultModuleTarget to set a fallback.

Custom templates not loading

Verify that CustomTemplatePath in Plugin Settings points to a valid directory containing .cft files with the same names as the defaults (e.g., actor_header.cft). Missing templates fall back to the built-in versions.

CodeForge v0.1.0 · Unreal Engine 5.7 · Copyright © 2026 GregOrigin. All Rights Reserved.

gregorigin.com · Available on Fab