Skip to content

t1k:unity:base:project-structure

FieldValue
Modulebase
Version2.2.2
Effortmedium
Tools

Keywords: _Game, asset placement, assets folder, file layout, folder structure, project structure, scaffold, scripts folder, where to put

/t1k:unity:base:project-structure

Where every folder, asset, and script belongs in a TheOne Unity mobile-game project. Any contributor (or agent) can place a new asset/script without guessing, and scaffold a new game’s tree in one safe command.

Assets/
├── <Unity-required + third-party + framework> ← layer 1: leave at root, do NOT move
├── Scripts/ ← layer 2: app composition root (bootstrap/DI)
└── _Game/ ← layer 3: project-owned root
├── TheOne.<Feature>/ ← reusable feature CODE modules
└── <GameName>/ ← game-specific ASSETS (the big tree)

Layer 1 — Root folders (fixed, do not move)

Section titled “Layer 1 — Root folders (fixed, do not move)”
GroupFolders
Unity-required / engineAddressableAssetsData/, Editor/, Plugins/, Resources/, Settings/, URP/, TextMesh Pro/, Scenes/
Third-party SDKsPlayFabSDK/, GoogleMobileAds/, ByteBrewSDK/, Importers/, LocalizationSetting/
TheOne frameworkUITemplate/, TheOneFeature/, TheOne.FTUE/, VContainer/, Packages/
LiveOps dataBlueprints/ (Lives/Period/ProgressionReward CSV+JSON)

Layer 2 — Assets/Scripts/ (composition root only)

Section titled “Layer 2 — Assets/Scripts/ (composition root only)”

Bootstrap and DI wiring only — not gameplay:

  • Game.asmdef, GameLifetimeScope.cs (root VContainer scope)
  • Scenes/ — per-scene scopes; Adapters/ — framework bridges; Services/ — app services
  • link.xml — IL2CPP strip preservation

a) Feature CODE modules_Game/TheOne.<Feature>/Scripts/ + Scripts/DI/ (one asmdef pair each)

b) Game ASSET tree_Game/<GameName>/ top-level skeleton (fixed org-wide convention):

Animations/ Art/2D/ Audio/ Blueprints/ Prefabs/ Scenes/ ScriptableObjects/ Scripts/ Settings/ Shaders/ VFX/ _Incoming/

Leaf folders under Art/2D/…, ScriptableObjects/…, and VFX/… are game-specific — see the game’s wiki Asset-Pipeline page.

”Where does this go?” — placement table

Section titled “”Where does this go?” — placement table”
You have…Put it in
2D sprite / texture / atlas_Game/<Game>/Art/2D/<category>/
Animation clip / controller_Game/<Game>/Animations/Clips/ or Controllers/
Audio file_Game/<Game>/Audio/{BGM,SFX,Ambient,VO}/
Prefab_Game/<Game>/Prefabs/{UI,World,Cameras,VFX}/
Scene_Game/<Game>/Scenes/
ScriptableObject asset_Game/<Game>/ScriptableObjects/<family>/
VFX / Shader_Game/<Game>/VFX/ or Shaders/
Gameplay script (Mono/DOTS)_Game/<Game>/Scripts/{Runtime,Editor}/
Reusable feature module_Game/TheOne.<Feature>/Scripts/ (+ DI/)
App bootstrap / DI scopeAssets/Scripts/
Game data table (SO/CSV)_Game/<Game>/Blueprints/
LiveOps dataAssets/Blueprints/ (root)
Raw artist drop_Game/<Game>/_Incoming/ (gitignored)
DOTS gameplay engine codePackages/unity-dots-library/… — NOT Assets/
Third-party SDKAssets/ root — leave untouched

Full zsh-safe recipe: references/scaffold-recipe.md

Quick note: set GAME="MyGame", run from Assets/_Game/, the recipe creates .gitkeep placeholders. Unity generates .meta on next open.

  • zsh does NOT word-split unquoted variables. for d in $DIRS runs once — whole string as one token → garbage folder with embedded newlines. Use while IFS= read -r d (see scaffold-recipe.md). Real incident confirmed.
  • Don’t hand-write folder .meta files. Let Unity generate GUIDs. Commit .gitkeep; Unity meta-izes on next open.
  • The Assets/ root tree is fixed. Asset-import validators reject assets outside the canonical tree. Scaffold first, then drop assets.
  • DOTS code is NOT a _Game/ asset. ECS systems/components → Packages/unity-dots-library. Only game-specific adapters/authoring belong under _Game/<Game>/Scripts/.
  • _Game/TheOne.<Feature>/_Game/<GameName>/. Do not nest feature modules under the game folder.
  • t1k-unity-base-asset-import — AssetImportProcessor that promotes _Incoming/ drops
  • t1k-unity-base-code-conventions — C# naming/style for scripts placed here
  • t1k-unity-architecture-assembly-graph — asmdef layering across modules
  • Game wiki Asset-Pipeline → Folder Structure Standard — game-specific leaf folders