unrealcppgameplay
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "unrealcppgameplay" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-ebe6fe65f6f45e5b9c393a2723c6168ed07ba2e5dfb0843ec7b5809f95ae4dff. Verify the upstream source and version against https://skillhub.cn/skills/user_3c6cb52e/unreal-cpp-gameplay-hhgh before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
UnrealCppGameplay skill that helps AI Agents perform tasks and provide support for game development and design based on Unreal Engine.
Introduction source: third_party · user_3c6cb52e · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Write correct UE5 gameplay C++: the reflection macros that connect C++ to the editor and Blueprints, the Gameplay Framework class roles, and module dependencies. Targets **UE 5.4+**.
- Audience
- Use when creating C++ gameplay classes (`AActor`, `APawn`, `ACharacter`, `AGameModeBase`, `UActorComponent`), exposing properties/functions with `UPROPERTY`/`UFUNCTION`, setting up a GameMode's default classes, or adding a module dependency in `*.Build.cs`. Use when the project has a `Source/` tree with `*.h`/`*.cpp` using `UCLASS`, and `*.Build.cs`. When *not* to use:** designer-facing visual logic → `unreal-blueprints`. Player input binding details → `unreal-enhanced-input`. AI logic → `unreal-behavior-trees`. This skill owns the C++ class/reflection foundation those build on.
- Testing
- Not tested
Browse files
Frontmatter
name: Unrealcppgameplay
slug: unreal-cpp-gameplay
version: 1.0.0
displayName: Unrealcppgameplay
description: >
UnrealCppGameplay技能,帮助AI Agent进行游戏开发和设计。
summary: "UnrealCppGameplay技能,帮助AI Agent进行游戏开发和设计。"
license: Apache-2.0
category: 游戏开发
framework:
- Claude Code
- Codex
- Hermes Agent
- OpenClaw
- QClaw
- WorkBuddy
platform: multi-platform
homepage: https://github.com/1991513ccie-png
repository: https://github.com/1991513ccie-pngUnreal C++ Gameplay
Write correct UE5 gameplay C++: the reflection macros that connect C++ to the editor and Blueprints, the Gameplay Framework class roles, and module dependencies. Targets UE 5.4+.
When to use
- Use when creating C++ gameplay classes (
AActor,APawn,ACharacter,AGameModeBase,UActorComponent), exposing properties/functions withUPROPERTY/UFUNCTION, setting up a GameMode's default classes, or adding a module dependency in*.Build.cs. - Use when the project has a
Source/tree with*.h/*.cppusingUCLASS, and*.Build.cs.
When not to use: designer-facing visual logic → unreal-blueprints. Player input
binding details → unreal-enhanced-input. AI logic → unreal-behavior-trees. This skill owns
the C++ class/reflection foundation those build on.
Core workflow
- Name with the right prefix.
A= Actor-derived,U=UObject/component-derived,F= plain struct,E= enum,I= interface. The prefix must match the base class. - Declare the class with reflection macros.
UCLASS()above the class,GENERATED_BODY()as the first line in the body, and#include "ClassName.generated.h"as the last include in the header. - Expose data with
UPROPERTY(editor/Blueprint visibility and garbage-collection tracking) and behaviour withUFUNCTION(BlueprintCallable, etc.). - Create components in the constructor with
CreateDefaultSubobject<T>(TEXT("Name"))and set theRootComponent. - Know the framework roles:
AGameModeBasesets the rules + default classes;APawn/ACharacteris the controllable body;APlayerControlleris the player's will;UActorComponentis reusable behaviour. - Add module dependencies to
*.Build.cs(e.g.EnhancedInput) or unresolved-symbol link errors follow. - Verify by compiling (Live Coding
Ctrl+Alt+F11for function bodies; full rebuild for header/UPROPERTY changes) and checking the class/properties appear in the editor.
Patterns
1. Minimal Actor class (header + source)
// Pickup.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Pickup.generated.h" // MUST be the last include
UCLASS()
class MYGAME_API APickup : public AActor // MYGAME_API = your module's export macro
{
GENERATED_BODY()
public:
APickup();
// EditAnywhere = tweak per-instance & on the CDO; BlueprintReadWrite = BP get/set.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Pickup")
int32 ScoreValue = 10;
// UPROPERTY on a UObject* pointer is what keeps it from being garbage-collected.
UPROPERTY(VisibleAnywhere)
TObjectPtr<UStaticMeshComponent> Mesh; // UE5: TObjectPtr instead of raw UStaticMeshComponent*
UFUNCTION(BlueprintCallable, Category = "Pickup")
void Collect();
protected:
virtual void BeginPlay() override;
};
// Pickup.cpp
#include "Pickup.h"
#include "Components/StaticMeshComponent.h"
APickup::APickup()
{
Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
RootComponent = Mesh; // the mesh is this actor's root
}
void APickup::BeginPlay() { Super::BeginPlay(); } // always call Super
void APickup::Collect() { Destroy(); }
2. GameMode wiring its default classes
// MyGameMode.cpp — set in the constructor so the engine spawns your classes.
AMyGameMode::AMyGameMode()
{
DefaultPawnClass = AMyCharacter::StaticClass();
PlayerControllerClass = AMyPlayerController::StaticClass();
}
3. Module dependency in Build.cs
// MyGame.Build.cs
PublicDependencyModuleNames.AddRange(new string[]
{
"Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput"
});
Pitfalls
generated.hnot last / missing — compile errors like "Cannot find generated header" or "Expected an include". It must be the final include in the header.- Forgetting
GENERATED_BODY()— UHT (Unreal Header Tool) errors; it must be the first thing inside the class body. - *Raw `UObject
withoutUPROPERTY** — the garbage collector doesn't see it and may destroy it out from under you. Track every UObject pointer withUPROPERTY(useTObjectPtr` in UE5). - Header/UPROPERTY edits with Live Coding — Live Coding handles function bodies, but
changes to
UCLASS/UPROPERTY/headers need a full editor restart + rebuild. - Wrong class prefix — naming an Actor
UFoo(or a componentAFoo) breaks UHT; match the prefix to the base type. - Unresolved external symbol at link — the module providing the API isn't in
Build.csPublicDependencyModuleNames. - Not calling
Super::in overriddenBeginPlay/Tick/etc. skips engine setup.
References
- For
UActorComponentcreation/attachment, theUPROPERTYgarbage-collection ownership rules (TObjectPtr,TArray<TObjectPtr<>>,AddToRoot), and a replication primer, readreferences/components-and-gc.md. - Primary docs: "Unreal Engine CPP Quick Start" and "Gameplay Framework"
(
https://dev.epicgames.com/documentation/en-us/unreal-engine/gameplay-framework-in-unreal-engine).
Related skills
unreal-blueprints— exposing C++ to designers; BP/C++ interop.unreal-enhanced-input— binding input in a C++ Pawn/Character.unreal-behavior-trees— C++ AI tasks driven from a behaviour tree.
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Areas to improve
-
description内容重复 Reported severity: Minor
frontmatter 和 skill_body 中均包含相同的 description 内容
Recommendation: 可考虑在 frontmatter 中保留简洁描述,在 skill_body 中展开详细说明
Highlights
- 提供 Unreal Engine 5.4+ C++ 游戏开发的核心指导
- 覆盖反射宏、Gameplay Framework、模块依赖等高频刚需场景
- 内容详实,显著提升游戏开发效率
Highlights
- 触发词精准完整,明确区分适用与不适用场景
- 边界清晰,避免与其他 Skill 重叠
Areas to improve
-
缺少完整端到端项目示例 Reported severity: Minor
现有示例为代码片段,缺少一个完整的最小可运行项目示例
Recommendation: 可补充一个完整的 HelloWorld 级别项目结构示例
Highlights
- Phase/步骤清晰,包含 7 个核心工作流步骤
- 提供 3 个完整代码模式示例和 7 个常见陷阱
- frontmatter 完整,文档结构规范
Highlights
- 代码示例完整,包含头文件和源文件
- 覆盖主要异常情况和常见错误
- 工具来源明确,参数使用正确
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- dev.epicgames.com
- github.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.