MuharremTozan/Agentic-Duel / .agent/skills/unity-interaction
unity-interaction
VerifiedGeneric raycast-based interaction system. Works for any game genre (RPG, Platformer, Simulation).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 798 B |
| assets/code/IInteractable.cs.txt | markdown | 560 B |
| assets/code/InteractionController.cs.txt | markdown | 1.6 KB |
| assets/docs/Checklist.md.txt | markdown | 955 B |
| references/guide.md | markdown | 1.2 KB |
references/guide.md
View on GitHub# Interaction System Guide
## Core Concept
This skill provides a **generic, raycast-based interaction system** that works for any game genre.
## Quick Start
### 1. Setup Interactable Object
```csharp
using Standard.Interaction;
public class Door : MonoBehaviour, IInteractable {
public void Interact(IInteractor interactor) {
Debug.Log("Door opened!");
// Your door logic here
}
public void InteractAlternate(IInteractor interactor) {
Debug.Log("Door locked!");
}
}
```
### 2. Setup Player/AI
- Add `InteractionController` to your player
- Set `Interactable Layer` to match your objects
- Adjust `Interact Distance`
### 3. Layer Setup
1. Create a new Layer: "Interactable"
2. Assign it to all objects with `IInteractable`
3. Reference it in the controller
## Pro Tips
- **E Key**: Primary interaction
- **F Key**: Alternative interaction
- **Raycast Direction**: Uses `transform.forward` (works with both 2D and 3D)
- **Event Integration**: Add event firing in `SetSelectedTarget()` for UI feedback
## Use Cases
- Doors, chests, NPCs (RPG)
- Crafting stations, cooking (Simulation)
- Pickups, switches (Platformer)
- Any clickable object
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |