/goal Build an advanced playable 3D endless runner vertical slice in the current Unity project. Use Unity MCP when useful to create, configure, inspect, assign, save, and validate objects inside Unity.
Not a tiny prototype, not a final game. Deliver a playable, clean, expandable, performant, visually readable vertical slice.
Work inside the current project. Do not create a new project. Do not use external assets. Do not generate gameplay assets only at runtime. Assets may use Unity primitives, but must exist as real 3D objects, be saved as prefabs, and be stored in folders.
Create:
Assets/_Project/Scenes
Assets/_Project/Scripts/Core, Player, Camera, World, Spawning, Obstacles, Collectibles, UI
Assets/_Project/Prefabs/Player, Road, Obstacles, Collectibles, Environment
Assets/_Project/Materials
Create and save scene: EndlessRunner3D.
Game:
Player auto-runs forward on a 3-lane road, switches lanes smoothly, jumps, avoids obstacles, collects coins, gains score, accelerates over time, gets game over on obstacle collision, and restarts cleanly.
Controls:
A/Left Arrow = lane left
D/Right Arrow = lane right
Space = jump
R = restart after game over
Gameplay:
- exactly 3 lanes: left, center, right
- player never leaves the lane system
- smooth lane switching
- reliable grounded jump, no accidental double jump
- camera follows behind and above
- score increases with distance or time
- speed increases gradually
- coins increase the coin counter
- obstacle collision triggers game over
- game over stops movement, spawning, score, and speed
- restart resets player, score, coins, speed, obstacles, collectibles, and road state
Prefab requirements:
Create real 3D prefabs in Assets/_Project/Prefabs:
- Player prefab
- Road segment prefab
- Side barrier / guard rail prefab
- at least 3 distinct obstacle prefabs
- Coin prefab
Scripts may instantiate existing prefabs, but must not create main gameplay assets from scratch at runtime. No “create cube in Start()” asset pipeline. Prefabs must exist and be assigned through scene references.
Visual direction:
Clean low-poly placeholder style with clear colors and readable shapes. Player must not be only a default capsule: build a simple 3D runner with body, head, feet or direction marker. Road must show 3 lanes, markers, borders, and forward direction. Obstacles must be distinct and dangerous. Coins must be collectible.
World:
Create road recycling using road segment prefabs. Reposition/recycle segments ahead when behind. Avoid uncontrolled instantiation, gaps, popping, or unbounded object growth.
Spawning:
Create obstacle and coin spawners using prefab references. Spawn ahead on valid lanes only. Avoid impossible early patterns. Avoid coins and obstacles in the same blocking position unless handled. Clean/recycle spawned objects behind the player. Increase difficulty through speed, spacing, or spawn frequency.
Architecture:
Use modular scripts, not one giant file:
GameManager, PlayerRunnerController, PlayerCollisionHandler, CameraFollow, RoadSegmentManager, ObstacleSpawner, CollectibleSpawner, Obstacle, Coin, RunnerUI.
Responsibilities: state/score/speed/restart, auto-run/lanes/jump, collisions/coins, camera, road recycling, spawning, obstacle/coin behavior, UI.
Performance:
Recycle road segments. Clean/recycle obstacles and coins. Cache references. Avoid expensive searches in Update.
UI:
Create a Canvas with score, speed, coin count, game over panel, final score, and restart instruction/button. UI must work in Play Mode.
Validation:
No compile errors. Scene saved. Required folders/prefabs exist. Prefabs are assigned. Player auto-runs, switches lanes, jumps, and stays in 3 lanes. Camera follows. Score, speed, coins update. Obstacles/coins spawn ahead. Coins collect. Obstacle collision triggers game over. Restart works. No missing references, no NullReferenceException, no runtime-only asset generation.
Finish with summary: content, scene/prefab paths, main scripts, and how to test.