ue-core-types-and-containers

Guides selection and use of Unreal Engine core C++ containers, strings, math, and utility types.

55|5|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/kevinpbuckley/unreal-engine-skills --skill ue-core-types-and-containers-kevinpbuckley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ue-core-types-and-containers
Source: https://github.com/kevinpbuckley/unreal-engine-skills/tree/main/skills/core/ue-core-types-and-containers
Command: npx skills add https://github.com/kevinpbuckley/unreal-engine-skills --skill ue-core-types-and-containers-kevinpbuckley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Unreal Engine C++ code must use the engine's own types rather than the C++ standard library, and choosing the wrong type (FString vs FName vs FText, FRotator vs FQuat, TArray vs TMap) causes serialization failures, localization bugs, gimbal lock, and GC issues. This Skill gives an agent the correct UE 5.8 types, API signatures, and gotchas for everyday C++ work. ## Core Features & Use Cases - Container selection and usage: TArray, TMap, TSet, TQueue, TArrayView with idiomatic patterns (Reserve, Emplace, FindOrAdd, RemoveAll) and GC/UPROPERTY rules. - String and text handling: FString, FName, FText, TStringBuilder with the full conversion matrix, localization rules (NSLOCTEXT vs LOCTEXT), and encoding guidance. - Math types with LWC awareness: FVector, FRotator, FQuat, FTransform, FMath under UE5 double-precision (Large World Coordinates), including quaternion composition and Slerp conventions. - Utility types: TOptional, TVariant, TTuple, TPair with safe-access patterns (IsSet/GetValue, TryGet). - Use Case: When writing a gameplay class that stores spawned actors, formats a localized HP display, and blends rotations, the agent uses this Skill to pick UPROPERTY'd TArray<TObjectPtr<AActor>>, FText::Format with NSLOCTEXT, and FQuat::Slerp instead of std::vector, printf-style strings, and FRotator addition. ## Quick Start Use the ue-core-types-and-containers skill to write a UE 5.8 C++ function that stores hit results in a thread-safe queue and formats a localized damage message.

Frequently Asked Questions about ue-core-types-and-containers

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

FAQPage Schema
How do I choose between FString, FName, and FText in Unreal Engine?

Use FName for interned identifiers like socket or asset names (O(1) case-insensitive comparison), FString for mutable runtime string building and parsing, and FText for any user-facing text that must be localized. Never use FText::operator== for equality; call EqualTo() instead.

Should I use std::vector or TArray in Unreal C++?

Use TArray instead of std::vector in Unreal C++. UE containers integrate with UObject reflection, serialization, allocators, and garbage collection, while std types do not serialize or reflect correctly and cause friction with engine APIs.

When should I use FQuat instead of FRotator in UE5?

Use FQuat whenever composing or interpolating multiple rotations in code, since FRotator addition does not compose correctly across axes and suffers gimbal lock. FRotator remains appropriate for editor-facing properties and single-axis tweaks.

Why does my TArray of actors get garbage collected in Unreal?

A TArray of UObject pointers stored as a member must be declared as a UPROPERTY, otherwise the garbage collector can collect the referenced actors mid-frame. Use UPROPERTY() with TArray<TObjectPtr<AActor>> to keep entries alive.

Does UE5 FVector use float or double precision?

In UE5, FVector and all primary math types are double-precision as part of Large World Coordinates. Float variants like FVector3f exist for rendering and physics payloads, and assigning .X to a float variable silently narrows without an explicit cast.

How do I safely read a value from TOptional in Unreal?

Always call IsSet() before GetValue(), since GetValue() on an empty optional triggers a runtime check. Alternatively use Get(DefaultValue) to receive a fallback value without any assertion risk.