ue-cpp-foundations

Identify and apply Unreal Engine C++ reflection and memory management patterns.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/thilthpc01208/unreal-engine-skills --skill ue-cpp-foundations-thilthpc01208
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ue-cpp-foundations
Source: https://github.com/thilthpc01208/unreal-engine-skills/tree/main/skills/ue-cpp-foundations
Command: npx skills add https://github.com/thilthpc01208/unreal-engine-skills --skill ue-cpp-foundations-thilthpc01208

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps Unreal Engine C++ developers follow correct reflection, memory management, and API usage patterns across UE5, including proper use of UPROPERTY, UFUNCTION, UCLASS, TArray, TMap, delegates, FName, FString, and GC handling to prevent common pitfalls.

Core Features & Use Cases

  • UProperty/UFunction/Reflection basics: guidance on macros, GENERATED_BODY, and serialization to ensure reliable reflection and GC behavior.
  • Containers & Memory: practical patterns for TArray, TMap, TSet, TOptional, and UObject pointers (TObjectPtr, TWeakObjectPtr) with safe lifetime handling.
  • Delegates & Subsystems: patterns for dynamic/static delegates and common subsystem access methods to support responsive gameplay systems.
  • Actor/Component patterns: guidance on AActor and UActorComponent lifecycles, component composition, and UE5 conventions.

Quick Start

Explain the foundational UE C++ patterns for a new UObject-derived class and generate a minimal example that demonstrates reflection, GC-safe pointers, and a simple container usage.

Frequently Asked Questions about ue-cpp-foundations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use UPROPERTY and UFUNCTION macros for Unreal Engine C++ reflection?

To use UPROPERTY and UFUNCTION macros for Unreal Engine C++ reflection, apply them within a UCLASS-derived class using the GENERATED_BODY macro. This ensures reliable reflection, proper garbage collection behavior, and correct serialization for your UObject-derived types.

What is the best way to manage UObject lifetimes and GC pointers in UE5?

The best way to manage UObject lifetimes and GC pointers in UE5 is by using TObjectPtr and TWeakObjectPtr with correct UPROPERTY specifiers. This ensures safe memory handling, prevents dangling pointers, and maintains accurate garbage collection across Actor and Component architectures.

How do I use TArray, TMap, and TSet containers safely in Unreal Engine C++?

To use TArray, TMap, and TSet containers safely in Unreal Engine C++, follow practical memory patterns that pair them with TOptional and safe UObject pointer types. This approach ensures safe lifetime handling and prevents memory leaks in responsive gameplay systems.

How do I implement dynamic and static delegates in Unreal Engine 5?

To implement dynamic and static delegates in Unreal Engine 5, apply established delegate patterns that support responsive gameplay systems. Combine these with common subsystem access methods to ensure accurate event broadcasting and clean Actor lifecycles.

Does this guide cover AActor and UActorComponent composition patterns for UE5?

Yes, this guide covers AActor and UActorComponent composition patterns for UE5. It provides specific guidance on component lifecycles and UE5 conventions like TObjectPtr, ensuring safe memory management and accurate API usage within Actor architectures.