unreal-engine-cpp-pro

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

Author

Install

Hot:5

Download and extract to your skills directory

Copy command and send to OpenClaw for auto-install:

Download and install this skill https://openskills.cc/api/download?slug=sickn33-skills-unreal-engine-cpp-pro&locale=en&source=copy

Unreal Engine C++ Pro

Skill Overview


Unreal Engine C++ Pro offers expert-level C++ programming guidance for UE5 game development, covering best practices for UObject garbage collection, the reflection system, and performance optimization.

Use Cases


  • UE5 Game Development: When using C++ to build Actors, Components, and UObject-derived classes, ensure your code follows Epic’s official standards to avoid memory leaks and performance issues.

  • Performance Optimization: Gain concrete optimization advice and code patterns when working with hot-path code such as Tick optimization, component lookups, and type casting.

  • Blueprint Integration: Learn the correct usage of macros such as UCLASS and UFUNCTION to properly expose C++ functionality to Blueprints.
  • Core Features


  • UObject and Garbage Collection Management: Provides guidance on UPROPERTY usage conventions, TStrongObjectPtr application scenarios, safe checks with IsValid, and more—helping you avoid dangling pointers caused by GC.

  • Reflection System Usage: Explains the correct use of UCLASS, USTRUCT, UFUNCTION, and UPROPERTY macros in detail, including recommendations for choosing BlueprintReadWrite vs. BlueprintReadOnly.

  • Performance Optimization Patterns: Covers practical techniques such as Tick disabling strategies, component lookup caching, TSoftObjectPtr asynchronous loading, Cast optimization, and more to improve runtime performance.
  • FAQ

    Why should all UObject pointer members be marked with UPROPERTY?


    The UPROPERTY macro registers the pointer with Unreal’s garbage collection system. If you don’t mark it with UPROPERTY, GC may reclaim the object, causing the pointer to become a dangling reference. This is one of the most common sources of memory issues in UE5 C++ development.

    When should an Actor’s Tick be disabled?


    By default, set bCanEverTick to false for all Actors. Tick runs every frame, and in large projects it can significantly impact performance. If you need periodic logic, prefer using Timer (FTimerManager) or an event-driven mechanism instead.

    What’s the difference between TSoftObjectPtr and hard references?


    Hard references (e.g., TSubclassOf) create dependencies at compile time and force resources to load at startup, which may increase loading times. TSoftObjectPtr is a soft reference that allows asynchronous loading—ideal for large assets and optional dependencies—helping significantly reduce memory usage and startup time.

    This skill is only applicable to Unreal Engine 5.x versions. If you’re using an earlier version, some APIs and best practices may not apply.