Home / Market / unreal engine cpp pro

unreal engine cpp pro

Expert guide for Unreal Engine 5.x C++ development, covering UObject hygiene, performance patterns, and best practices.

skill★ 507591518 dlskills.shCC-BY-4.0 content; MIT code; upstream exceptions applyInstall in CosmosUpstream Source

Documentation & Preview

--- name: unreal-engine-cpp-pro description: "Expert guide for Unreal Engine 5.x C++ development, covering UObject hygiene, performance patterns, and best practices." risk: safe source: self date_added: "2026-02-27"

---

Unreal Engine C++ Pro

This skill provides expert-level guidelines for developing with Unreal Engine 5 using C++. It focuses on writing robust, performant, and standard-compliant code.

When to Use

Use this skill when:

Do not use this skill when:

Core Principles

  1. UObject & Garbage Collection:
  1. Unreal Reflection System:
  1. Performance First:

Naming Conventions (Strict)

Follow Epic Games' coding standard:

Common Patterns

1. Robust Component Lookup

Avoid GetComponentByClass in Tick. Do it in PostInitializeComponents or BeginPlay.

void AMyCharacter::PostInitializeComponents() {
    Super::PostInitializeComponents();
    HealthComp = FindComponentByClass<UHealthComponent>();
    check(HealthComp); // Fail hard in dev if missing
}

2. Interface Implementation

Use interfaces to decouple systems (e.g., Interaction system).

// Interface call check
if (TargetActor->Implements<UInteractable>()) {
    IInteractable::Execute_OnInteract(TargetActor, this);
}

3. Async Loading (Soft References)

Avoid hard references (UPROPERTY(EditDefaultsOnly) TSubclassOf<AActor>) for massive assets which force load orders. Use TSoftClassPtr or TSoftObjectPtr.

UPROPERTY(EditAnywhere, BlueprintReadWrite)
TSoftClassPtr<AWeapon> WeaponClassToLoad;

void AMyCharacter::Equip() {
    if (WeaponClassToLoad.IsPending()) {
        WeaponClassToLoad.LoadSynchronous(); // Or use StreamableManager for async
    }
}

Debugging

    DEFINE_LOG_CATEGORY_STATIC(LogMyGame, Log, All);
    UE_LOG(LogMyGame, Warning, TEXT("Health is low: %f"), CurrentHealth);
    if (GEngine) GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("Died!"));

Checklist before PR

Limitations