add-component

Adds and configures Unreal Engine components on actor classes and Blueprint assets.

Updated May 29, 2026
One-click install
npx skills add https://github.com/JanVogelsang/UE-AgentFramework --skill add-component-janvogelsang
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: add-component
Source: https://github.com/JanVogelsang/UE-AgentFramework/tree/main/UnrealEngine/skills/add-component
Command: npx skills add https://github.com/JanVogelsang/UE-AgentFramework --skill add-component-janvogelsang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding components to Unreal Engine actors requires repetitive boilerplate across headers, constructors, and build files, and modifying Blueprint assets at design time normally demands manual editor work. This Skill provides the exact C++ patterns and a native tool call to attach components correctly in both workflows. ## Core Features & Use Cases - C++ Component Setup: Generates the UPROPERTY declaration, CreateDefaultSubobject call, attachment to RootComponent, and required include for any component type. - Blueprint Component Attachment: Uses the add_blueprint_component tool to attach components like UStaticMeshComponent or UNiagaraComponent to existing .uasset Blueprints without touching C++ source. - Module Dependency Guidance: Reminds you to add non-core modules (e.g., UMG, Niagara) to PublicDependencyModuleNames in the .Build.cs file. - Use Case: You need to add a UAudioComponent to an existing AMyCharacter class and a USphereComponent to BP_Enemy — the Skill produces the header/constructor code for the first and the tool invocation for the second. ## Quick Start Ask the agent to add a UStaticMeshComponent named MeshComponent to your actor class or Blueprint asset and configure its default properties.

Frequently Asked Questions about add-component

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

FAQPage Schema
How do I add a component to an actor in Unreal Engine C++?▼

Declare the component as a UPROPERTY with TObjectPtr in the header, then call CreateDefaultSubobject in the constructor and attach it with SetupAttachment to RootComponent. Add the required include for the component type.

How to attach a component to a Blueprint asset without editing C++?▼

Use the add_blueprint_component tool with the Blueprint asset path, component class, new component name, and an optional parent component. It modifies the .uasset at design time without changing source code.

Why should I use TObjectPtr instead of raw pointers for UE components?▼

TObjectPtr provides garbage collection safety for UPROPERTY members in Unreal Engine. Raw pointers risk dangling references when the engine's GC system reclaims objects.

Why does my component fail to compile after adding it to an actor?▼

Components from non-core modules like UMG or Niagara require the module to be added to PublicDependencyModuleNames in the .Build.cs file. Missing module dependencies cause unresolved include or linker errors.

What is the difference between VisibleAnywhere and EditAnywhere in UE?▼

VisibleAnywhere shows the component in the viewport but prevents property editing, while EditAnywhere allows modifying its properties in the details panel. Choose based on whether designers need to tune defaults.