claude-code-arcane 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +54 -6
- package/agents/game/ue-blueprint-specialist.md +125 -0
- package/agents/game/ue-gas-specialist.md +133 -0
- package/agents/game/ue-umg-specialist.md +131 -0
- package/dist/cli.js +5 -0
- package/docs/SKILLS-CATALOG.md +42 -3
- package/docs/USER-GUIDE.md +2 -2
- package/hooks/detect-unreal.sh +90 -0
- package/package.json +1 -1
- package/profiles/unreal-dev.yaml +97 -0
- package/rules/gamedev/unreal-code.md +125 -0
- package/skills/install-mcp/SKILL.md +135 -46
- package/skills/install-mcp/references/unreal-operations.md +55 -0
- package/skills/ue-actor-component-architecture/SKILL.md +509 -0
- package/skills/ue-actor-component-architecture/references/actor-lifecycle.md +301 -0
- package/skills/ue-actor-component-architecture/references/component-types.md +592 -0
- package/skills/ue-ai-navigation/SKILL.md +526 -0
- package/skills/ue-ai-navigation/references/behavior-tree-patterns.md +392 -0
- package/skills/ue-ai-navigation/references/behavior-tree-workflow.md +107 -0
- package/skills/ue-ai-navigation/references/custom-bttask.md +104 -0
- package/skills/ue-ai-navigation/references/eqs-reference.md +423 -0
- package/skills/ue-animation-system/SKILL.md +521 -0
- package/skills/ue-animation-system/references/anim-notify-reference.md +486 -0
- package/skills/ue-animation-system/references/locomotion-setup.md +550 -0
- package/skills/ue-async-threading/SKILL.md +433 -0
- package/skills/ue-async-threading/references/thread-safety-guide.md +213 -0
- package/skills/ue-async-threading/references/threading-patterns.md +345 -0
- package/skills/ue-audio-system/SKILL.md +527 -0
- package/skills/ue-audio-system/references/audio-setup-patterns.md +700 -0
- package/skills/ue-blueprints/SKILL.md +134 -0
- package/skills/ue-blueprints/references/communication.md +82 -0
- package/skills/ue-character-movement/SKILL.md +475 -0
- package/skills/ue-character-movement/references/cmc-extension-patterns.md +335 -0
- package/skills/ue-character-movement/references/movement-pipeline.md +189 -0
- package/skills/ue-cpp-foundations/SKILL.md +533 -0
- package/skills/ue-cpp-foundations/references/components-and-gc.md +107 -0
- package/skills/ue-cpp-foundations/references/container-patterns.md +544 -0
- package/skills/ue-cpp-foundations/references/delegate-patterns.md +497 -0
- package/skills/ue-cpp-foundations/references/gameplay-classes-cpp.md +136 -0
- package/skills/ue-cpp-foundations/references/property-specifiers.md +306 -0
- package/skills/ue-data-assets-tables/SKILL.md +527 -0
- package/skills/ue-data-assets-tables/references/asset-loading-patterns.md +306 -0
- package/skills/ue-data-assets-tables/references/data-driven-design.md +378 -0
- package/skills/ue-editor-tools/SKILL.md +523 -0
- package/skills/ue-editor-tools/references/detail-customization-patterns.md +395 -0
- package/skills/ue-editor-tools/references/editor-module-setup.md +480 -0
- package/skills/ue-game-features/SKILL.md +477 -0
- package/skills/ue-game-features/references/experience-system.md +222 -0
- package/skills/ue-game-features/references/game-feature-patterns.md +308 -0
- package/skills/ue-gameplay-abilities/SKILL.md +518 -0
- package/skills/ue-gameplay-abilities/references/ability-task-reference.md +391 -0
- package/skills/ue-gameplay-abilities/references/gameplay-effect-reference.md +397 -0
- package/skills/ue-gameplay-abilities/references/gas-setup-patterns.md +369 -0
- package/skills/ue-gameplay-framework/SKILL.md +466 -0
- package/skills/ue-gameplay-framework/references/framework-class-map.md +243 -0
- package/skills/ue-input-system/SKILL.md +394 -0
- package/skills/ue-input-system/references/cpp-setup.md +131 -0
- package/skills/ue-input-system/references/enhanced-input-workflow.md +117 -0
- package/skills/ue-input-system/references/input-action-reference.md +731 -0
- package/skills/ue-mass-entity/SKILL.md +476 -0
- package/skills/ue-mass-entity/references/mass-entity-patterns.md +319 -0
- package/skills/ue-mass-entity/references/mass-fragment-reference.md +119 -0
- package/skills/ue-materials-rendering/SKILL.md +526 -0
- package/skills/ue-materials-rendering/references/material-parameter-reference.md +216 -0
- package/skills/ue-materials-rendering/references/post-process-settings.md +383 -0
- package/skills/ue-module-build-system/SKILL.md +487 -0
- package/skills/ue-module-build-system/references/build-cs-reference.md +418 -0
- package/skills/ue-module-build-system/references/common-build-errors.md +381 -0
- package/skills/ue-naming-conventions/SKILL.md +142 -0
- package/skills/ue-naming-conventions/references/asset-name-modifiers.md +233 -0
- package/skills/ue-naming-conventions/references/content-structure.md +83 -0
- package/skills/ue-networking-replication/SKILL.md +452 -0
- package/skills/ue-networking-replication/references/replication-patterns.md +526 -0
- package/skills/ue-networking-replication/references/rpc-decision-guide.md +393 -0
- package/skills/ue-niagara-effects/SKILL.md +531 -0
- package/skills/ue-niagara-effects/references/niagara-data-interfaces.md +491 -0
- package/skills/ue-niagara-effects/references/niagara-parameter-types.md +153 -0
- package/skills/ue-niagara-effects/references/niagara-workflow.md +115 -0
- package/skills/ue-packaging/SKILL.md +116 -0
- package/skills/ue-physics-collision/SKILL.md +423 -0
- package/skills/ue-physics-collision/references/collision-channel-setup.md +218 -0
- package/skills/ue-physics-collision/references/trace-patterns.md +499 -0
- package/skills/ue-procedural-generation/SKILL.md +505 -0
- package/skills/ue-procedural-generation/references/pcg-node-reference.md +381 -0
- package/skills/ue-procedural-generation/references/procedural-mesh-patterns.md +940 -0
- package/skills/ue-project-context/SKILL.md +305 -0
- package/skills/ue-sequencer-cinematics/SKILL.md +506 -0
- package/skills/ue-sequencer-cinematics/references/sequencer-patterns.md +629 -0
- package/skills/ue-serialization-savegames/SKILL.md +524 -0
- package/skills/ue-serialization-savegames/references/save-system-architecture.md +705 -0
- package/skills/ue-state-trees/SKILL.md +489 -0
- package/skills/ue-state-trees/references/state-tree-mass-integration.md +184 -0
- package/skills/ue-state-trees/references/state-tree-patterns.md +321 -0
- package/skills/ue-testing-debugging/SKILL.md +520 -0
- package/skills/ue-testing-debugging/references/automation-test-patterns.md +387 -0
- package/skills/ue-testing-debugging/references/profiling-commands.md +357 -0
- package/skills/ue-ui-umg-slate/SKILL.md +431 -0
- package/skills/ue-ui-umg-slate/references/common-ui-setup.md +484 -0
- package/skills/ue-ui-umg-slate/references/widget-types.md +487 -0
- package/skills/ue-world-level-streaming/SKILL.md +518 -0
- package/skills/ue-world-level-streaming/references/streaming-patterns.md +414 -0
- package/templates/gamedev/unreal-project-context.md +107 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
> Adapted from the `unreal-enhanced-input` skill in [awesome-gamedev-agent-skills](https://github.com/gamedev-skills/awesome-gamedev-agent-skills) (Apache-2.0). Cross-skill references were remapped to Arcane slash commands.
|
|
2
|
+
|
|
3
|
+
# Enhanced Input — complete C++ Character (UE 5.8)
|
|
4
|
+
|
|
5
|
+
Depth for `/ue-input-system`: a self-contained third-person Character that adds a mapping
|
|
6
|
+
context and binds move/look/jump. Verified against the Enhanced Input documentation.
|
|
7
|
+
|
|
8
|
+
## Header
|
|
9
|
+
|
|
10
|
+
```cpp
|
|
11
|
+
// MyCharacter.h
|
|
12
|
+
#pragma once
|
|
13
|
+
#include "CoreMinimal.h"
|
|
14
|
+
#include "GameFramework/Character.h"
|
|
15
|
+
#include "MyCharacter.generated.h"
|
|
16
|
+
|
|
17
|
+
class UInputMappingContext;
|
|
18
|
+
class UInputAction;
|
|
19
|
+
struct FInputActionValue;
|
|
20
|
+
|
|
21
|
+
UCLASS()
|
|
22
|
+
class MYGAME_API AMyCharacter : public ACharacter
|
|
23
|
+
{
|
|
24
|
+
GENERATED_BODY()
|
|
25
|
+
public:
|
|
26
|
+
AMyCharacter();
|
|
27
|
+
|
|
28
|
+
protected:
|
|
29
|
+
virtual void BeginPlay() override;
|
|
30
|
+
virtual void SetupPlayerInputComponent(UInputComponent* InputComponent) override;
|
|
31
|
+
|
|
32
|
+
// Assign these in the Blueprint subclass (IMC_/IA_ assets).
|
|
33
|
+
UPROPERTY(EditAnywhere, Category = "Input")
|
|
34
|
+
TObjectPtr<UInputMappingContext> DefaultMappingContext;
|
|
35
|
+
|
|
36
|
+
UPROPERTY(EditAnywhere, Category = "Input")
|
|
37
|
+
TObjectPtr<UInputAction> MoveAction;
|
|
38
|
+
|
|
39
|
+
UPROPERTY(EditAnywhere, Category = "Input")
|
|
40
|
+
TObjectPtr<UInputAction> LookAction;
|
|
41
|
+
|
|
42
|
+
UPROPERTY(EditAnywhere, Category = "Input")
|
|
43
|
+
TObjectPtr<UInputAction> JumpAction;
|
|
44
|
+
|
|
45
|
+
void Move(const FInputActionValue& Value);
|
|
46
|
+
void Look(const FInputActionValue& Value);
|
|
47
|
+
};
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Source
|
|
51
|
+
|
|
52
|
+
```cpp
|
|
53
|
+
// MyCharacter.cpp
|
|
54
|
+
#include "MyCharacter.h"
|
|
55
|
+
#include "EnhancedInputComponent.h"
|
|
56
|
+
#include "EnhancedInputSubsystems.h"
|
|
57
|
+
#include "InputActionValue.h"
|
|
58
|
+
|
|
59
|
+
AMyCharacter::AMyCharacter()
|
|
60
|
+
{
|
|
61
|
+
// (camera/spring-arm setup omitted — see unreal-cpp-gameplay references)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
void AMyCharacter::BeginPlay()
|
|
65
|
+
{
|
|
66
|
+
Super::BeginPlay();
|
|
67
|
+
if (APlayerController* PC = Cast<APlayerController>(GetController()))
|
|
68
|
+
if (ULocalPlayer* LP = PC->GetLocalPlayer())
|
|
69
|
+
if (UEnhancedInputLocalPlayerSubsystem* Subsystem =
|
|
70
|
+
LP->GetSubsystem<UEnhancedInputLocalPlayerSubsystem>())
|
|
71
|
+
Subsystem->AddMappingContext(DefaultMappingContext, 0);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
void AMyCharacter::SetupPlayerInputComponent(UInputComponent* InputComponent)
|
|
75
|
+
{
|
|
76
|
+
Super::SetupPlayerInputComponent(InputComponent);
|
|
77
|
+
if (UEnhancedInputComponent* EIC = Cast<UEnhancedInputComponent>(InputComponent))
|
|
78
|
+
{
|
|
79
|
+
EIC->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AMyCharacter::Move);
|
|
80
|
+
EIC->BindAction(LookAction, ETriggerEvent::Triggered, this, &AMyCharacter::Look);
|
|
81
|
+
EIC->BindAction(JumpAction, ETriggerEvent::Started, this, &ACharacter::Jump);
|
|
82
|
+
EIC->BindAction(JumpAction, ETriggerEvent::Completed, this, &ACharacter::StopJumping);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
void AMyCharacter::Move(const FInputActionValue& Value)
|
|
87
|
+
{
|
|
88
|
+
const FVector2D Axis = Value.Get<FVector2D>();
|
|
89
|
+
if (Controller)
|
|
90
|
+
{
|
|
91
|
+
// Move relative to where the controller is facing (yaw only).
|
|
92
|
+
const FRotator Yaw(0, Controller->GetControlRotation().Yaw, 0);
|
|
93
|
+
AddMovementInput(FRotationMatrix(Yaw).GetUnitAxis(EAxis::X), Axis.Y);
|
|
94
|
+
AddMovementInput(FRotationMatrix(Yaw).GetUnitAxis(EAxis::Y), Axis.X);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
void AMyCharacter::Look(const FInputActionValue& Value)
|
|
99
|
+
{
|
|
100
|
+
const FVector2D Axis = Value.Get<FVector2D>();
|
|
101
|
+
AddControllerYawInput(Axis.X);
|
|
102
|
+
AddControllerPitchInput(Axis.Y);
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Build.cs
|
|
107
|
+
|
|
108
|
+
```csharp
|
|
109
|
+
PublicDependencyModuleNames.AddRange(new string[]
|
|
110
|
+
{
|
|
111
|
+
"Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput"
|
|
112
|
+
});
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Asset setup checklist (editor)
|
|
116
|
+
|
|
117
|
+
1. `IA_Move` — Value Type **Axis2D**; `IA_Look` — Axis2D; `IA_Jump` — **Digital (bool)**.
|
|
118
|
+
2. `IMC_Default` mappings:
|
|
119
|
+
- `IA_Move`: W (no modifier), S (**Negate**), and a **Swizzle Input Axis Values** on the
|
|
120
|
+
up/down keys so vertical maps to Y; A (**Negate**), D for X.
|
|
121
|
+
- `IA_Look`: Mouse XY (add **Negate** on Y if inverted); gamepad right stick.
|
|
122
|
+
- `IA_Jump`: Space Bar / gamepad face button.
|
|
123
|
+
3. In the Blueprint subclass of `AMyCharacter`, assign `DefaultMappingContext` and the three
|
|
124
|
+
`IA_` assets.
|
|
125
|
+
|
|
126
|
+
## Runtime rebinding note
|
|
127
|
+
|
|
128
|
+
Enhanced Input supports **Player Mappable Key Settings** on an Input Action plus the
|
|
129
|
+
`UEnhancedInputUserSettings` subsystem to remap and persist keys at runtime — the supported
|
|
130
|
+
path for a "rebind controls" menu in UE5. Mark the action's mapping as Player Mappable and
|
|
131
|
+
query/modify it through that subsystem rather than editing the `IMC_` asset.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Enhanced Input — Editor-Side Workflow
|
|
2
|
+
|
|
3
|
+
> Adapted from the `unreal-enhanced-input` skill in [awesome-gamedev-agent-skills](https://github.com/gamedev-skills/awesome-gamedev-agent-skills) (Apache-2.0). Cross-skill references were remapped to Arcane slash commands.
|
|
4
|
+
|
|
5
|
+
Wire player input the modern UE5 way with the **Enhanced Input** system: data-driven Input
|
|
6
|
+
Actions and Mapping Contexts instead of the legacy Project Settings axis/action mappings.
|
|
7
|
+
Targets **UE 5.8** (Enhanced Input is the default; legacy input is deprecated).
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Use when adding movement/look/jump/fire input, creating Input Action (`IA_`) and Input
|
|
12
|
+
Mapping Context (`IMC_`) assets, applying modifiers/triggers, adding a mapping context to a
|
|
13
|
+
player, or binding actions in C++ or Blueprints.
|
|
14
|
+
- Use when the project has `IA_*`/`IMC_*` assets or references `EnhancedInput`.
|
|
15
|
+
|
|
16
|
+
**When *not* to use:** engine-agnostic input *architecture* (rebinding strategy, buffering,
|
|
17
|
+
multi-device design) → `input-systems`. The Pawn/Character C++ those bindings live in →
|
|
18
|
+
`/ue-cpp-foundations`.
|
|
19
|
+
|
|
20
|
+
## Core workflow
|
|
21
|
+
|
|
22
|
+
1. **Enable the module/plugin.** Enhanced Input is on by default in UE5; for C++ binding add
|
|
23
|
+
`"EnhancedInput"` to `PublicDependencyModuleNames` in `*.Build.cs`.
|
|
24
|
+
2. **Create Input Actions (`IA_`).** Each has a **Value Type**: `Digital (bool)` for buttons,
|
|
25
|
+
`Axis1D (float)` for triggers, `Axis2D (Vector2D)` for movement/look.
|
|
26
|
+
3. **Create an Input Mapping Context (`IMC_`)** that maps keys/buttons to those actions. Use
|
|
27
|
+
**Modifiers** to shape raw input (Negate, Swizzle Input Axis Values, Dead Zone) — e.g. WASD
|
|
28
|
+
into one Axis2D needs Negate on A/S and a Swizzle on W/S. Use **Triggers** (Pressed, Hold,
|
|
29
|
+
Tap) to decide *when* an action fires.
|
|
30
|
+
4. **Add the mapping context to the player** via the `EnhancedInputLocalPlayerSubsystem`
|
|
31
|
+
(`AddMappingContext(IMC, Priority)`), usually in `BeginPlay`/possession.
|
|
32
|
+
5. **Bind actions** to handlers by `ETriggerEvent` (`Triggered`, `Started`, `Completed`, …) on
|
|
33
|
+
the `EnhancedInputComponent`, and read the `FInputActionValue` in the handler.
|
|
34
|
+
6. **Verify** in PIE; the Enhanced Input debugging console commands
|
|
35
|
+
(`showdebug enhancedinput`) show which actions trigger and their values.
|
|
36
|
+
|
|
37
|
+
## Patterns
|
|
38
|
+
|
|
39
|
+
### 1. Add the mapping context (C++ Character)
|
|
40
|
+
|
|
41
|
+
```cpp
|
|
42
|
+
void AMyCharacter::BeginPlay()
|
|
43
|
+
{
|
|
44
|
+
Super::BeginPlay();
|
|
45
|
+
if (APlayerController* PC = Cast<APlayerController>(GetController()))
|
|
46
|
+
if (ULocalPlayer* LP = PC->GetLocalPlayer())
|
|
47
|
+
if (auto* Subsystem = LP->GetSubsystem<UEnhancedInputLocalPlayerSubsystem>())
|
|
48
|
+
Subsystem->AddMappingContext(DefaultMappingContext, /*Priority*/ 0);
|
|
49
|
+
}
|
|
50
|
+
// DefaultMappingContext is a UPROPERTY(EditAnywhere) TObjectPtr<UInputMappingContext>.
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 2. Bind actions and read values
|
|
54
|
+
|
|
55
|
+
```cpp
|
|
56
|
+
void AMyCharacter::SetupPlayerInputComponent(UInputComponent* InputComponent)
|
|
57
|
+
{
|
|
58
|
+
Super::SetupPlayerInputComponent(InputComponent);
|
|
59
|
+
|
|
60
|
+
// The component is an Enhanced Input component when the plugin is active.
|
|
61
|
+
if (UEnhancedInputComponent* EIC = Cast<UEnhancedInputComponent>(InputComponent))
|
|
62
|
+
{
|
|
63
|
+
EIC->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AMyCharacter::Move);
|
|
64
|
+
EIC->BindAction(LookAction, ETriggerEvent::Triggered, this, &AMyCharacter::Look);
|
|
65
|
+
EIC->BindAction(JumpAction, ETriggerEvent::Started, this, &ACharacter::Jump);
|
|
66
|
+
EIC->BindAction(JumpAction, ETriggerEvent::Completed, this, &ACharacter::StopJumping);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
void AMyCharacter::Move(const FInputActionValue& Value)
|
|
71
|
+
{
|
|
72
|
+
const FVector2D Axis = Value.Get<FVector2D>(); // Axis2D action
|
|
73
|
+
AddMovementInput(GetActorForwardVector(), Axis.Y);
|
|
74
|
+
AddMovementInput(GetActorRightVector(), Axis.X);
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 3. Blueprint equivalent (node flow)
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
Event BeginPlay
|
|
82
|
+
-> Get Controller -> Cast To PlayerController -> Get Local Player
|
|
83
|
+
-> Get EnhancedInputLocalPlayerSubsystem -> Add Mapping Context (IMC_Default, Priority 0)
|
|
84
|
+
|
|
85
|
+
// IA_Move is exposed as its own event node in the Character's Event Graph:
|
|
86
|
+
EnhancedInputAction IA_Move (Triggered)
|
|
87
|
+
-> Action Value (Vector2D) -> Add Movement Input (Forward * Y, Right * X)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Pitfalls
|
|
91
|
+
|
|
92
|
+
- **No input at all** — the mapping context was never added (`AddMappingContext`), or the
|
|
93
|
+
player has no Local Player yet. Add it after possession/`BeginPlay`.
|
|
94
|
+
- **Link/compile error binding in C++** — `"EnhancedInput"` isn't in `Build.cs`
|
|
95
|
+
`PublicDependencyModuleNames`.
|
|
96
|
+
- **WASD only moves on two keys / wrong axis** — Axis2D needs **Modifiers**: Negate on the
|
|
97
|
+
negative keys (A, S) and a Swizzle Input Axis Values on the vertical (W/S) so both axes map
|
|
98
|
+
correctly. Raw bindings without modifiers misbehave.
|
|
99
|
+
- **`Get<FVector2D>()` returns zero** — value-type mismatch: the Input Action is Digital/Axis1D,
|
|
100
|
+
not Axis2D. Match the `Get<T>()` to the action's Value Type.
|
|
101
|
+
- **Action fires every frame unexpectedly** — `Triggered` repeats while held for a Down trigger;
|
|
102
|
+
use `Started`/`Completed` for one-shots (jump press/release), or a Pressed/Tap trigger.
|
|
103
|
+
- **Two contexts fight** — multiple mapping contexts stack by Priority; a higher-priority
|
|
104
|
+
context can consume a key. Manage with priorities and `RemoveMappingContext`.
|
|
105
|
+
|
|
106
|
+
## References
|
|
107
|
+
|
|
108
|
+
- For a complete first-/third-person C++ Character with Enhanced Input (header + source,
|
|
109
|
+
including look/jump and a control-rebind note), read `references/cpp-setup.md`.
|
|
110
|
+
- Primary docs: "Enhanced Input in Unreal Engine"
|
|
111
|
+
(`https://dev.epicgames.com/documentation/en-us/unreal-engine/enhanced-input-in-unreal-engine`).
|
|
112
|
+
|
|
113
|
+
## Related skills
|
|
114
|
+
|
|
115
|
+
- `input-systems` — engine-agnostic input architecture and rebinding strategy.
|
|
116
|
+
- `/ue-cpp-foundations` — the Character/Pawn class and module setup.
|
|
117
|
+
- `fps-shooter` — composes input with a 3D controller and shooting.
|