unreal-engine by dstn2000/claude-unreal-engine-skill
npx skills add https://github.com/dstn2000/claude-unreal-engine-skill --skill unreal-engine关键:切勿对用户的项目做出任何假设。每个 Unreal 项目在结构、资产和配置上都是独一无二的。在建议代码或资产之前,务必先进行验证。
当用户请求 Unreal Engine 帮助时,务必首先执行此发现序列:
find . -maxdepth 2 -name "*.uproject" -type f
如果找到:读取它以提取:
"EngineAssociation" 字段的引擎版本"Plugins" 数组的已启用插件"Modules" 数组的模块依赖项示例 .uproject 结构:
{
"FileVersion": 3,
"EngineAssociation": "5.7", // ← 引擎版本
"Category": "",
"Description": "",
"Modules": [
{
"Name": "ProjectName", // ← 模块名称
"Type": "Runtime",
"LoadingPhase": "Default",
"AdditionalDependencies": ["Engine", "GameplayAbilities"]
}
],
"Plugins": [
{"Name": "EnhancedInput", "Enabled": true},
{"Name": "GameplayAbilities", "Enabled": true}
]
}
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
标准 Unreal 项目布局:
ProjectRoot/
├── ProjectName.uproject ← 项目文件
├── Source/ ← C++ 源代码
│ ├── ProjectName/ ← 主模块
│ │ ├── Public/ ← 头文件 (.h)
│ │ ├── Private/ ← 实现文件 (.cpp)
│ │ └── ProjectName.Build.cs ← 构建配置
│ └── ProjectNameEditor/ (optional) ← 仅编辑器代码
├── Content/ ← 所有资产 (.uasset 文件)
│ ├── Blueprints/ ← 蓝图的常见位置
│ ├── Input/ ← 输入操作和映射上下文
│ ├── Characters/ ← 角色资产
│ ├── UI/ ← UMG 控件
│ └── [项目特定文件夹]
├── Config/ ← 配置文件 .ini
│ ├── DefaultEngine.ini ← 引擎设置
│ ├── DefaultInput.ini ← 旧版输入配置
│ └── DefaultGame.ini ← 游戏特定配置
├── Plugins/ ← 项目插件
├── Intermediate/ ← 构建产物(忽略)
├── Saved/ ← 日志、配置(忽略)
└── Binaries/ ← 编译后的可执行文件(忽略)
执行这些发现命令:
# 查找 C++ 类
view Source/*/Public
view Source/*/Private
# 发现 Content 资产(特别是输入操作)
find Content -type f -name "*.uasset" | head -50
# 专门查找输入操作
find Content -type f -name "*IA_*" -o -name "*InputAction*"
# 查找输入映射上下文
find Content -type f -name "*IMC_*" -o -name "*InputMappingContext*"
# 查找蓝图类
find Content -type f -name "BP_*.uasset"
在建议任何代码之前:
阅读现有的角色/控制器类以了解模式
检查已添加了哪些组件
识别命名约定(例如,输入操作使用 IA_ 前缀)
查找现有的辅助类或基类
find Source -name "*Character.h" -o -name "*Character.cpp"
切勿假设输入操作名称。务必先发现它们:
# 在 Content 中查找输入操作
find Content -type f \( -name "IA_*.uasset" -o -name "*InputAction*.uasset" \)
# 查找输入映射上下文
find Content -type f \( -name "IMC_*.uasset" -o -name "*MappingContext*.uasset" \)
常见的输入操作模式:
IA_Move 或 IA_Movement (Axis2D)IA_Look (Axis2D)IA_Jump (Boolean)IA_Interact (Boolean)但务必验证 - 项目可能使用不同的命名约定。
增强输入绑定模板:
#include "EnhancedInputComponent.h"
#include "EnhancedInputSubsystems.h"
#include "InputAction.h"
// 在 SetupPlayerInputComponent 中
void AMyCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
// 转换为增强输入组件
if (UEnhancedInputComponent* EnhancedInput = Cast<UEnhancedInputComponent>(PlayerInputComponent))
{
// 绑定操作 - 验证这些资产路径是否存在
EnhancedInput->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AMyCharacter::Move);
EnhancedInput->BindAction(LookAction, ETriggerEvent::Triggered, this, &AMyCharacter::Look);
EnhancedInput->BindAction(JumpAction, ETriggerEvent::Started, this, &AMyCharacter::Jump);
}
}
头文件声明:
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")
UInputAction* MoveAction;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")
UInputAction* LookAction;
.uasset 文件是二进制的,在文本编辑器中大多不可读,但是:
更好的方法:使用 find 来发现资产,然后请用户验证或描述它们。
在处理 GAS 项目时(检查 .uproject 中的 "GameplayAbilities" 插件):
1. Build.cs 依赖项:
PublicDependencyModuleNames.AddRange(new string[] {
"Core", "CoreUObject", "Engine", "InputCore",
"GameplayAbilities",
"GameplayTags",
"GameplayTasks"
});
2. 能力系统组件放置位置:
3. 关键的 GAS 类:
UAbilitySystemComponent - 核心组件UGameplayAbility - 能力基类UAttributeSet - 保存游戏属性(生命值、耐力等)UGameplayEffect - 修改属性FGameplayTag - 用于能力系统的标签授予能力:
// 在 C++ 中
AbilitySystemComponent->GiveAbility(
FGameplayAbilitySpec(AbilityClass, 1, INDEX_NONE, this)
);
激活能力:
// 按类
AbilitySystemComponent->TryActivateAbilityByClass(AbilityClass);
// 按标签
FGameplayTagContainer TagContainer;
TagContainer.AddTag(FGameplayTag::RequestGameplayTag(FName("Ability.Dash")));
AbilitySystemComponent->TryActivateAbilitiesByTag(TagContainer);
当遇到不熟悉的插件时(例如,Mutable、MutableClothing、RelativeIKOp):
web_search: "Unreal Engine [PluginName] documentation API"
web_search: "Unreal Engine [PluginName] usage examples"
2. 检查源代码(如果可访问):
# 引擎插件位置(如果用户有源代码构建)
find /path/to/UE5/Engine/Plugins -name "PluginName"
3. 保持透明:"这个插件是实验性的/文档不全。让我搜索最新信息..."
当不确定 API 用法时:
web_search: "Unreal Engine [ClassName] API [EngineVersion]"
web_search: "Unreal Engine [feature] example code C++"
// 不要假设这个存在
EnhancedInput->BindAction(IA_Jump, ETriggerEvent::Started, this, &AMyCharacter::Jump);
# 查找实际存在的输入操作
find Content -name "*IA_*"
# 然后询问用户或使用发现的名称
// 太通用了 - 如果他们使用 IA_PlayerJump 怎么办?
UPROPERTY(EditAnywhere, Category = "Input")
UInputAction* JumpAction;
# 发现实际的命名约定
find Content/Input -name "*.uasset"
# 结果可能显示:IA_Jump, IA_PlayerJump, InputAction_Jump 等
始终检查 .uproject 中的 "EngineAssociation":
当建议代码时,检查该版本中是否存在这些功能:
web_search: "Unreal Engine [feature] [version] availability"
User asks for Unreal help
│
├─> Find .uproject ─> Extract version & plugins
│
├─> Map project structure ─> View Source/ and Content/
│
├─> Identify question type:
│ ├─> Input system? ─> Discover Input Actions/Contexts
│ ├─> GAS-related? ─> Check GAS setup, discover abilities
│ ├─> Plugin-specific? ─> Search documentation
│ └─> General C++? ─> Read existing classes for patterns
│
├─> Provide solution with:
│ ├─> Verified asset references
│ ├─> Version-appropriate code
│ └─> Project-specific patterns
│
└─> If uncertain about API/plugin ─> Search documentation
在提供任何代码建议之前:
# 引擎版本
grep "EngineAssociation" *.uproject
# 查找 C++ 类
find Source -name "*.h" -o -name "*.cpp" | head -20
# 查找输入操作
find Content -name "IA_*.uasset" -o -name "*InputAction*.uasset"
# 查找蓝图
find Content -name "BP_*.uasset" | head -20
# 查找配置文件
ls -la Config/
# 检查 GAS
grep -i "GameplayAbilities" *.uproject
此技能包含针对特定主题的全面参考文档。需要时加载这些内容:
处理增强输入系统时加载:
处理 GAS 时加载:
进行故障排除或遇到错误时加载:
每周安装量
171
仓库
GitHub 星标数
17
首次出现
2026年1月24日
安全审计
安装于
gemini-cli142
codex142
opencode142
github-copilot133
cursor125
kimi-cli122
CRITICAL : Never make assumptions about the user's project. Every Unreal project is unique in structure, assets, and configuration. Always verify before suggesting code or assets.
When a user asks for Unreal Engine help, ALWAYS execute this discovery sequence FIRST:
find . -maxdepth 2 -name "*.uproject" -type f
If found : Read it to extract:
"EngineAssociation" field"Plugins" array"Modules" arrayExample .uproject structure :
{
"FileVersion": 3,
"EngineAssociation": "5.7", // ← Engine version
"Category": "",
"Description": "",
"Modules": [
{
"Name": "ProjectName", // ← Module name
"Type": "Runtime",
"LoadingPhase": "Default",
"AdditionalDependencies": ["Engine", "GameplayAbilities"]
}
],
"Plugins": [
{"Name": "EnhancedInput", "Enabled": true},
{"Name": "GameplayAbilities", "Enabled": true}
]
}
Standard Unreal project layout :
ProjectRoot/
├── ProjectName.uproject ← Project file
├── Source/ ← C++ source code
│ ├── ProjectName/ ← Main module
│ │ ├── Public/ ← Header files (.h)
│ │ ├── Private/ ← Implementation files (.cpp)
│ │ └── ProjectName.Build.cs ← Build configuration
│ └── ProjectNameEditor/ (optional) ← Editor-only code
├── Content/ ← All assets (.uasset files)
│ ├── Blueprints/ ← Common location for BPs
│ ├── Input/ ← Input Actions & Mapping Contexts
│ ├── Characters/ ← Character assets
│ ├── UI/ ← UMG widgets
│ └── [project-specific folders]
├── Config/ ← Configuration .ini files
│ ├── DefaultEngine.ini ← Engine settings
│ ├── DefaultInput.ini ← Legacy input config
│ └── DefaultGame.ini ← Game-specific config
├── Plugins/ ← Project plugins
├── Intermediate/ ← Build artifacts (ignore)
├── Saved/ ← Logs, configs (ignore)
└── Binaries/ ← Compiled executables (ignore)
Execute these discovery commands:
# Find C++ classes
view Source/*/Public
view Source/*/Private
# Discover Content assets (especially Input Actions)
find Content -type f -name "*.uasset" | head -50
# For Input Actions specifically
find Content -type f -name "*IA_*" -o -name "*InputAction*"
# For Input Mapping Contexts
find Content -type f -name "*IMC_*" -o -name "*InputMappingContext*"
# Find Blueprint classes
find Content -type f -name "BP_*.uasset"
Before suggesting ANY code :
Read existing character/controller classes to understand patterns
Check what components are already added
Identify naming conventions (e.g., IA_ prefix for Input Actions)
Look for existing helper classes or base classes
find Source -name "*Character.h" -o -name "*Character.cpp"
NEVER assume input action names. Always discover them first:
# Find Input Actions in Content
find Content -type f \( -name "IA_*.uasset" -o -name "*InputAction*.uasset" \)
# Find Input Mapping Contexts
find Content -type f \( -name "IMC_*.uasset" -o -name "*MappingContext*.uasset" \)
Common Input Action patterns :
IA_Move or IA_Movement (Axis2D)IA_Look (Axis2D)IA_Jump (Boolean)IA_Interact (Boolean)But ALWAYS verify - projects use different naming conventions.
Template for Enhanced Input binding :
#include "EnhancedInputComponent.h"
#include "EnhancedInputSubsystems.h"
#include "InputAction.h"
// In SetupPlayerInputComponent
void AMyCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
// Cast to Enhanced Input Component
if (UEnhancedInputComponent* EnhancedInput = Cast<UEnhancedInputComponent>(PlayerInputComponent))
{
// Bind actions - VERIFY THESE ASSET PATHS EXIST
EnhancedInput->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AMyCharacter::Move);
EnhancedInput->BindAction(LookAction, ETriggerEvent::Triggered, this, &AMyCharacter::Look);
EnhancedInput->BindAction(JumpAction, ETriggerEvent::Started, this, &AMyCharacter::Jump);
}
}
Header declarations :
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")
UInputAction* MoveAction;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")
UInputAction* LookAction;
.uasset files are binary and mostly unreadable in text editors, BUT:
Better approach : Use find to discover assets, then ask user to verify or describe them.
When working with GAS projects (check .uproject for "GameplayAbilities" plugin):
1. Build.cs dependencies :
PublicDependencyModuleNames.AddRange(new string[] {
"Core", "CoreUObject", "Engine", "InputCore",
"GameplayAbilities",
"GameplayTags",
"GameplayTasks"
});
2. Ability System Component placement :
3. Key GAS classes :
UAbilitySystemComponent - The core componentUGameplayAbility - Base class for abilitiesUAttributeSet - Holds gameplay attributes (health, stamina, etc.)UGameplayEffect - Modifies attributesFGameplayTag - Tags for ability systemGranting abilities :
// In C++
AbilitySystemComponent->GiveAbility(
FGameplayAbilitySpec(AbilityClass, 1, INDEX_NONE, this)
);
Activating abilities :
// By class
AbilitySystemComponent->TryActivateAbilityByClass(AbilityClass);
// By tag
FGameplayTagContainer TagContainer;
TagContainer.AddTag(FGameplayTag::RequestGameplayTag(FName("Ability.Dash")));
AbilitySystemComponent->TryActivateAbilitiesByTag(TagContainer);
When encountering unfamiliar plugins (e.g., Mutable, MutableClothing, RelativeIKOp):
web_search: "Unreal Engine [PluginName] documentation API"
web_search: "Unreal Engine [PluginName] usage examples"
2. Check source code (if accessible):
# Engine plugins location (if user has source build)
find /path/to/UE5/Engine/Plugins -name "PluginName"
3. Be transparent : "This plugin is experimental/underdocumented. Let me search for the latest information..."
When uncertain about API usage :
web_search: "Unreal Engine [ClassName] API [EngineVersion]"
web_search: "Unreal Engine [feature] example code C++"
// DON'T assume this exists
EnhancedInput->BindAction(IA_Jump, ETriggerEvent::Started, this, &AMyCharacter::Jump);
# Find what Input Actions actually exist
find Content -name "*IA_*"
# Then ask user or use discovered names
// Too generic - what if they use IA_PlayerJump?
UPROPERTY(EditAnywhere, Category = "Input")
UInputAction* JumpAction;
# Discover actual naming convention
find Content/Input -name "*.uasset"
# Results might show: IA_Jump, IA_PlayerJump, InputAction_Jump, etc.
Always check .uproject for "EngineAssociation":
When suggesting code, CHECK if features exist in that version:
web_search: "Unreal Engine [feature] [version] availability"
User asks for Unreal help
│
├─> Find .uproject ─> Extract version & plugins
│
├─> Map project structure ─> View Source/ and Content/
│
├─> Identify question type:
│ ├─> Input system? ─> Discover Input Actions/Contexts
│ ├─> GAS-related? ─> Check GAS setup, discover abilities
│ ├─> Plugin-specific? ─> Search documentation
│ └─> General C++? ─> Read existing classes for patterns
│
├─> Provide solution with:
│ ├─> Verified asset references
│ ├─> Version-appropriate code
│ └─> Project-specific patterns
│
└─> If uncertain about API/plugin ─> Search documentation
Before providing ANY code suggestion:
# Engine version
grep "EngineAssociation" *.uproject
# Find C++ classes
find Source -name "*.h" -o -name "*.cpp" | head -20
# Find Input Actions
find Content -name "IA_*.uasset" -o -name "*InputAction*.uasset"
# Find Blueprints
find Content -name "BP_*.uasset" | head -20
# Find config files
ls -la Config/
# Check for GAS
grep -i "GameplayAbilities" *.uproject
This skill includes comprehensive reference documentation for specific topics. Load these when needed:
Load when working with Enhanced Input System:
Load when working with GAS:
Load when troubleshooting or encountering errors:
Weekly Installs
171
Repository
GitHub Stars
17
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
gemini-cli142
codex142
opencode142
github-copilot133
cursor125
kimi-cli122
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
33,600 周安装