Files
ggj2026/AGENTS.md

38 lines
1.6 KiB
Markdown

# GGJ2026 Agent Notes
These notes are for coding agents working in this repo. Keep them short, actionable, and up to date.
## Project Overview
- Unity project (2D). Main code in `Assets/Scripts/`.
- Input uses Unity Input System with `Assets/InputSystem_Actions.inputactions`.
- Scene of interest: `Assets/Scenes/Level1.unity`.
## Input/Controllers
- Player controllers are `PlayerPlatformerController` and `PlayerPickupController`.
- Each controller instantiates its own `InputActionAsset` and can filter to a specific device.
- Device filtering is based on:
- `controlSchemeName == "Gamepad"` and/or
- `gamepadIndex >= 0`.
- When no matching gamepad is available, controllers ignore input until the device appears.
- Gamepad index inference:
- `actionMapName = Player` -> index 0
- `actionMapName = Player2/Player3/...` -> index (N-1)
- If you add/rename action maps, update inference or set `gamepadIndex` explicitly.
## Level1 Scene Notes
- Player 2/3/4 are placed directly in the scene and set to Gamepad.
- Current expected indices:
- Player2 -> `gamepadIndex: 0`
- Player3 -> `gamepadIndex: 1`
- Player4 -> `gamepadIndex: 2`
- If you want a 4th controller player, set `gamepadIndex: 3` and ensure `controlSchemeName: Gamepad`.
## Prefabs
- `Assets/Prefabs/Player.prefab` defaults to `controlSchemeName: Keyboard&Mouse` and `gamepadIndex: -1`.
- If you instantiate players at runtime, set `gamepadIndex` and `controlSchemeName` per player.
## Editing Tips
- Use `rg` for searches (`rg -n "term" Assets`).
- Prefer `apply_patch` for small edits.
- Avoid touching `Library/`, `Temp/`, and `Logs/`.