# Project Folder Structure

This manual explains where files belong in this Unity project and why. Use it when adding new assets, scripts, prefabs, scenes, animations, or documentation.

## Top-Level Structure

```text
Assets
├── Animations
├── Art
├── Audio
├── Docs
├── Editor
├── Materials
├── Physics
├── Prefabs
├── Scenes
├── Scripts
└── Settings
```

The structure separates source assets, reusable objects, gameplay code, level files, and team documentation.

## Main Rule

Put files where teammates will expect to find them.

```text
Raw visual files       -> Art
Animation files        -> Animations
Reusable GameObjects   -> Prefabs
Gameplay code          -> Scripts
Scene/level files      -> Scenes
Team manuals           -> Docs
Editor tools           -> Editor
Project configuration  -> Settings
```

Do not place everything in one folder. Unity projects become difficult to maintain when scripts, sprites, prefabs, and animations are mixed together.

## Animations

Path:

```text
Assets/Animations
```

Current subfolders:

```text
Assets/Animations/Player/Rika
Assets/Animations/Enemies/Monster
Assets/Animations/Enemies/Wizard
Assets/Animations/Bosses/AshenTitan
Assets/Animations/Others
```

Put these files here:

```text
.anim
.controller
```

Examples:

```text
Rika.controller
Rika_Idle.anim
Monster.controller
Monster_Attack.anim
Wizard_Death.anim
fire_camp.controller
fire_camp.anim
```

Rule:

```text
Animation clips and Animator Controllers belong under Animations, not Art or Prefabs.
```

## Art

Path:

```text
Assets/Art
```

Current subfolders:

```text
Assets/Art/Characters/Player
Assets/Art/Characters/Enemies
Assets/Art/Characters/Bosses
Assets/Art/Environment/Backgrounds
Assets/Art/Environment/Grounds
Assets/Art/Environment/Props
Assets/Art/Effects/Projectiles
Assets/Art/UI
```

Put raw visual assets here:

```text
Sprites
Sprite sheets
Background images
Tiles
Projectile images
UI images
```

Rule:

```text
Art files are source visuals. They are not configured gameplay objects.
```

For example, a fire camp sprite belongs in `Art/Environment/Props`, but the configured fire camp checkpoint belongs in `Prefabs/Environment`.

## Audio

Path:

```text
Assets/Audio
```

Current subfolders:

```text
Assets/Audio/Music
Assets/Audio/SFX
```

Use:

```text
Music -> background tracks
SFX   -> jump, shoot, hit, UI, enemy, environment sounds
```

## Docs

Path:

```text
Assets/Docs
```

Use for team manuals and project conventions.

Examples:

```text
01_Project_Overview.md
02_Unity_Mental_Model_GameObject_Components.md
03_Project_Folder_Structure.md
```

Keep docs in the project so they are versioned with the game.

## Editor

Path:

```text
Assets/Editor
```

Only use this folder for Unity Editor tools.

Examples:

```text
RikaAnimatorTransitionSetup.cs
animator.cs
```

Important:

```text
Scripts in Assets/Editor do not run in the built game.
Do not put runtime gameplay scripts here.
```

## Materials

Path:

```text
Assets/Materials
```

Use for materials used by renderers, effects, or special visual setups.

## Physics

Path:

```text
Assets/Physics
```

Use for shared physics assets such as:

```text
Physics Material 2D
Collision tuning assets
Reusable physics configuration
```

## Prefabs

Path:

```text
Assets/Prefabs
```

Current subfolders:

```text
Assets/Prefabs/Characters
Assets/Prefabs/Combat
Assets/Prefabs/Environment
Assets/Prefabs/UI
```

Examples:

```text
Assets/Prefabs/Characters/Rika.prefab
Assets/Prefabs/Characters/Monster.prefab
Assets/Prefabs/Characters/Witch.prefab
Assets/Prefabs/Combat/Rika_Bullet.prefab
Assets/Prefabs/Combat/Wizard_bullet.prefab
Assets/Prefabs/Environment/fire_camp.prefab
```

Rule:

```text
If an object will be reused, make it a prefab.
```

## Scenes

Path:

```text
Assets/Scenes
```

Current examples:

```text
SampleScene.unity
Level1_Rebuilt.unity
```

Scenes are for level assembly:

```text
Placed prefab instances
Main Camera
Global Light 2D
Level-specific layout
```

Do not use scenes as the only place to store reusable gameplay setup.

## Scripts

Path:

```text
Assets/Scripts
```

Current subfolders:

```text
Assets/Scripts/Camera
Assets/Scripts/Combat
Assets/Scripts/Enemy
Assets/Scripts/Environment
Assets/Scripts/Level
Assets/Scripts/Player
Assets/Scripts/UI
```

Use this mapping:

| Script responsibility | Folder |
| --- | --- |
| Player movement, fuel, shooting, respawn | `Scripts/Player` |
| Enemy AI, enemy HP, enemy attack hitboxes | `Scripts/Enemy` |
| Bullets and projectiles | `Scripts/Combat` |
| Camera behavior | `Scripts/Camera` |
| Checkpoints and world interactions | `Scripts/Environment` |
| HUD and UI behavior | `Scripts/UI` |
| Level-specific systems | `Scripts/Level` |

## Settings

Path:

```text
Assets/Settings
```

Current examples:

```text
Renderer2D.asset
UniversalRP.asset
Lit2DSceneTemplate.scenetemplate
```

These affect rendering and project-wide setup. Change them carefully.

## Naming Rules

Use names that show purpose.

Good:

```text
Rika.prefab
Monster.prefab
Wizard_bullet.prefab
Monster_Attack.anim
PlayerFuel.cs
RestCheckpoint.cs
```

Avoid:

```text
new.prefab
test2.anim
script.cs
enemy_final_final.prefab
```

## When Adding New Content

Use this checklist:

1. Add raw sprites to `Assets/Art`.
2. Add animation clips/controllers to `Assets/Animations`.
3. Add gameplay scripts to `Assets/Scripts`.
4. Add reusable configured objects to `Assets/Prefabs`.
5. Place prefab instances in `Assets/Scenes`.
6. Document team conventions in `Assets/Docs`.

## Summary

The folder structure exists to answer this question quickly:

```text
What kind of file is this, and who owns it?
```

Keep the structure predictable. Future teammates should be able to find the right file without searching the whole project.
