Skip to content

Unreal Engine Cheat Sheet

Overview

Unreal Engine is a leading AAA game engine developed by Epic Games, used for creating high-fidelity games, architectural visualizations, film production, and interactive experiences. It provides industry-standard rendering capabilities including Nanite (virtualized geometry), Lumen (global illumination), and virtual shadow maps. The engine supports both C++ programming and Blueprints, a powerful visual scripting system that enables rapid prototyping and full game logic creation without writing code.

Unreal Engine 5 introduced transformative features like World Partition for massive open worlds, Chaos physics for destruction and cloth simulation, MetaHuman for realistic digital humans, and Procedural Content Generation (PCG) for creating vast environments. The engine is free to use until a project earns over $1 million in revenue, after which a 5% royalty applies. It exports to PC, consoles (PlayStation, Xbox, Switch), mobile, and VR/AR platforms.

Installation

# Install Epic Games Launcher from:
# https://www.unrealengine.com/download

# Linux: build from source
git clone https://github.com/EpicGames/UnrealEngine.git
cd UnrealEngine
./Setup.sh
./GenerateProjectFiles.sh
make

# Required dependencies (Linux)
sudo apt install build-essential mono-complete mono-devel dos2unix \
  cmake clang libx11-dev libxcursor-dev libxinerama-dev

# Verify installation
# Open Epic Games Launcher > Unreal Engine tab > Install

# System requirements:
# - 64-bit Windows 10/11 or macOS 13+, or Linux
# - 16GB RAM minimum (32GB recommended)
# - SSD with 100GB+ free space
# - DirectX 12 / Vulkan capable GPU (8GB VRAM recommended)

Project Structure

MyProject/
├── Config/
│   ├── DefaultEngine.ini        # Engine settings
│   ├── DefaultGame.ini          # Game settings
│   ├── DefaultInput.ini         # Input mappings
│   └── DefaultEditor.ini        # Editor preferences
├── Content/                     # All assets (meshes, textures, etc.)
│   ├── Blueprints/
│   ├── Characters/
│   ├── Environment/
│   ├── Maps/
│   ├── Materials/
│   ├── UI/
│   └── Audio/
├── Source/                      # C++ source code
│   ├── MyProject/
│   │   ├── MyProject.Build.cs
│   │   ├── MyProjectGameMode.h
│   │   ├── MyProjectGameMode.cpp
│   │   ├── MyProjectCharacter.h
│   │   └── MyProjectCharacter.cpp
│   └── MyProject.Target.cs
├── Plugins/                     # Project plugins
├── MyProject.uproject           # Project file
└── Binaries/                    # Compiled output

C++ Fundamentals

// MyCharacter.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "MyCharacter.generated.h"

UCLASS()
class MYPROJECT_API AMyCharacter : public ACharacter
{
    GENERATED_BODY()

public:
    AMyCharacter();

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats")
    float Health = 100.0f;

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats")
    float MaxHealth = 100.0f;

    UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
    class UCameraComponent* CameraComp;

    UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
    class USpringArmComponent* SpringArmComp;

    UFUNCTION(BlueprintCallable, Category = "Combat")
    void TakeDamage(float DamageAmount);

    UFUNCTION(BlueprintPure, Category = "Stats")
    float GetHealthPercent() const;

protected:
    virtual void BeginPlay() override;
    virtual void Tick(float DeltaTime) override;
    virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;

private:
    void MoveForward(float Value);
    void MoveRight(float Value);
    void StartJump();
    void StopJump();
};
// MyCharacter.cpp
#include "MyCharacter.h"
#include "Camera/CameraComponent.h"
#include "GameFramework/SpringArmComponent.h"
#include "GameFramework/CharacterMovementComponent.h"

AMyCharacter::AMyCharacter()
{
    PrimaryActorTick.bCanEverTick = true;

    SpringArmComp = CreateDefaultSubobject<USpringArmComponent>(TEXT("SpringArm"));
    SpringArmComp->SetupAttachment(RootComponent);
    SpringArmComp->TargetArmLength = 300.0f;
    SpringArmComp->bUsePawnControlRotation = true;

    CameraComp = CreateDefaultSubobject<UCameraComponent>(TEXT("Camera"));
    CameraComp->SetupAttachment(SpringArmComp);

    GetCharacterMovement()->MaxWalkSpeed = 600.0f;
    GetCharacterMovement()->JumpZVelocity = 420.0f;
}

void AMyCharacter::BeginPlay()
{
    Super::BeginPlay();
    Health = MaxHealth;
}

void AMyCharacter::Tick(float DeltaTime)
{
    Super::Tick(DeltaTime);
}

void AMyCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
    Super::SetupPlayerInputComponent(PlayerInputComponent);
    PlayerInputComponent->BindAxis("MoveForward", this, &AMyCharacter::MoveForward);
    PlayerInputComponent->BindAxis("MoveRight", this, &AMyCharacter::MoveRight);
    PlayerInputComponent->BindAction("Jump", IE_Pressed, this, &AMyCharacter::StartJump);
    PlayerInputComponent->BindAction("Jump", IE_Released, this, &AMyCharacter::StopJump);
    PlayerInputComponent->BindAxis("Turn", this, &APawn::AddControllerYawInput);
    PlayerInputComponent->BindAxis("LookUp", this, &APawn::AddControllerPitchInput);
}

void AMyCharacter::MoveForward(float Value)
{
    FVector Direction = FRotationMatrix(Controller->GetControlRotation()).GetScaledAxis(EAxis::X);
    AddMovementInput(Direction, Value);
}

void AMyCharacter::MoveRight(float Value)
{
    FVector Direction = FRotationMatrix(Controller->GetControlRotation()).GetScaledAxis(EAxis::Y);
    AddMovementInput(Direction, Value);
}

void AMyCharacter::TakeDamage(float DamageAmount)
{
    Health = FMath::Clamp(Health - DamageAmount, 0.0f, MaxHealth);
    if (Health <= 0.0f)
    {
        // Handle death
    }
}

float AMyCharacter::GetHealthPercent() const
{
    return Health / MaxHealth;
}

UPROPERTY Specifiers

SpecifierDescription
EditAnywhereEditable in editor on instance and defaults
EditDefaultsOnlyEditable only on Blueprint defaults
EditInstanceOnlyEditable only on placed instances
VisibleAnywhereRead-only in editor
BlueprintReadWriteRead/write from Blueprints
BlueprintReadOnlyRead-only from Blueprints
ReplicatedReplicated over network
TransientNot saved to disk
Category = "Name"Group in editor details panel
meta = (ClampMin, ClampMax)Clamp numeric values

UFUNCTION Specifiers

SpecifierDescription
BlueprintCallableCallable from Blueprints
BlueprintPurePure function (no execution pin)
BlueprintImplementableEventDefined in C++, implemented in BP
BlueprintNativeEventC++ default, overridable in BP
ServerRuns on server (multiplayer)
ClientRuns on owning client
NetMulticastRuns on all clients
ReliableGuaranteed delivery (networking)

Enhanced Input System

// Input Action and Mapping Context setup
#include "EnhancedInputComponent.h"
#include "EnhancedInputSubsystems.h"

UPROPERTY(EditAnywhere, Category = "Input")
UInputMappingContext* DefaultMappingContext;

UPROPERTY(EditAnywhere, Category = "Input")
UInputAction* MoveAction;

UPROPERTY(EditAnywhere, Category = "Input")
UInputAction* JumpAction;

void AMyCharacter::BeginPlay()
{
    Super::BeginPlay();
    if (APlayerController* PC = Cast<APlayerController>(Controller))
    {
        auto* Subsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(PC->GetLocalPlayer());
        Subsystem->AddMappingContext(DefaultMappingContext, 0);
    }
}

void AMyCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
    auto* EIC = CastChecked<UEnhancedInputComponent>(PlayerInputComponent);
    EIC->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AMyCharacter::Move);
    EIC->BindAction(JumpAction, ETriggerEvent::Started, this, &ACharacter::Jump);
}

void AMyCharacter::Move(const FInputActionValue& Value)
{
    FVector2D MovementVector = Value.Get<FVector2D>();
    FRotator Rotation = Controller->GetControlRotation();
    FRotator YawRotation(0, Rotation.Yaw, 0);
    FVector ForwardDirection = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::X);
    FVector RightDirection = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::Y);
    AddMovementInput(ForwardDirection, MovementVector.Y);
    AddMovementInput(RightDirection, MovementVector.X);
}

Build Commands

# Build from command line (using UnrealBuildTool)
# Windows
"C:/Program Files/Epic Games/UE_5.4/Engine/Build/BatchFiles/Build.bat" \
  MyProject Win64 Development "C:/Projects/MyProject/MyProject.uproject"

# Package project
"C:/Program Files/Epic Games/UE_5.4/Engine/Build/BatchFiles/RunUAT.bat" \
  BuildCookRun -project="MyProject.uproject" \
  -noP4 -platform=Win64 -clientconfig=Shipping \
  -cook -allmaps -build -stage -pak -archive \
  -archivedirectory="C:/Builds"

# Linux
./Engine/Build/BatchFiles/Linux/Build.sh \
  MyProject Linux Development ~/Projects/MyProject/MyProject.uproject

# Cook content only
RunUAT BuildCookRun -project=MyProject.uproject -cook -skipstage

Advanced Usage

// Delegates and events
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnHealthChanged, float, NewHealth);

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

// Broadcast event
OnHealthChanged.Broadcast(Health);

// Timers
GetWorldTimerManager().SetTimer(
    TimerHandle, this, &AMyActor::DoSomething, 2.0f, true
);

// Spawning actors
FActorSpawnParameters SpawnParams;
SpawnParams.Owner = this;
AProjectile* Projectile = GetWorld()->SpawnActor<AProjectile>(
    ProjectileClass, MuzzleLocation, MuzzleRotation, SpawnParams
);

// Line traces (raycasting)
FHitResult HitResult;
FVector Start = CameraComp->GetComponentLocation();
FVector End = Start + (CameraComp->GetForwardVector() * 10000.0f);
FCollisionQueryParams Params;
Params.AddIgnoredActor(this);

if (GetWorld()->LineTraceSingleByChannel(HitResult, Start, End, ECC_Visibility, Params))
{
    AActor* HitActor = HitResult.GetActor();
    // Process hit
}

// Gameplay Ability System (basic setup)
UPROPERTY()
UAbilitySystemComponent* AbilitySystemComponent;

void AMyCharacter::InitializeAbilities()
{
    if (AbilitySystemComponent)
    {
        for (TSubclassOf<UGameplayAbility>& Ability : DefaultAbilities)
        {
            AbilitySystemComponent->GiveAbility(
                FGameplayAbilitySpec(Ability, 1, INDEX_NONE, this)
            );
        }
    }
}

Troubleshooting

IssueSolution
Compile error: GENERATED_BODYEnsure *.generated.h is included; delete Intermediate folder and rebuild
Blueprint changes not reflectingCompile Blueprint; check for errors in output log
Package build failsCook content first; check output log for missing references
Editor crashes on loadDelete Saved/ and Intermediate/ folders; verify engine version
Textures blurryCheck texture streaming pool size; adjust LOD bias
Physics not workingEnsure “Simulate Physics” enabled; check collision presets
Multiplayer desyncUse UPROPERTY(Replicated) and implement GetLifetimeReplicatedProps
Long compile timesEnable Live Coding; use precompiled headers; add MYPROJECT_API exports
Nanite artifactsCheck mesh requirements; ensure no degenerate triangles
Hot reload corrupts stateUse Live Coding instead; restart editor for major header changes