About unity-interaction
unity-interaction is a minimal interaction pattern for Unity, intended for projects that need generic object interaction. It uses interfaces and raycasting, supports primary and alternative actions, and consists of two core files without external dependencies.
Key features
- 01Interface-based interactables
- 02Primary and alternative actions
- 03Raycast target detection
- 04Self-contained implementation
Use cases
- 01Adding interactions to varied Unity objects
- 02Selecting targets based on player facing
- 03Handling primary and alternative input actions
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ muharremtozan/ unity-agent-skills --skill unity-interactionAfter installing, type/unity-interactionin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
assets/code/IInteractable.cs.txtInteractionController.cs.txtassets/docs/Checklist.md.txtreferences/guide.mdDetails
From the project READMEUnity Interaction System
Minimal, generic interaction pattern using interfaces and raycasting.
Core Features
- Interface-Based:
IInteractableworks on any object type - Dual Actions: Primary (E) and Alternative (F) interactions
- Raycast Detection: Automatic target selection based on player facing
- Zero Dependencies: Self-contained, no external skill requirements
Core Files (2 files only)
IInteractable.cs.txt: Core interfaces for interactables and interactorsInteractionController.cs.txt: Raycast-based detection and input handling
Usage
See guide.md for implementation examples.
Comments
Markdown supported