# Project structure

## Scenes

*<mark style="color:green;">**\_Loader**</mark>* *<mark style="color:green;">scene</mark> is enter point of game. <mark style="color:red;">**Dont rename it**</mark>, because name is used in* [*SceneSystem*](https://reddycat.gitbook.io/base-project-cube-doc/fundamentals/singletons/scene-system)*.* It loads when player opens the app. AppStart.cs is main controller of this scene, here you can define custom splash logic (icon animations and etc), play it, at the end AppStart.cs will load next scene. In AppStart.cs you can also init notifications or other singletons. [*<mark style="color:red;">**See how game entry systems initialize here**</mark>*](https://reddycat.gitbook.io/base-project-cube-doc/fundamentals/appstart#dontdestroyonload-systems-initialization-in-loader-scene).\
\ <mark style="color:green;">**GameScene**</mark> is main scene to run core game loop. Here will be your game main logic, art and etc. You can split GameScene into LevelScenes (but It's highly recomended to use single scene for multiple levels, it can be implemented as level prefab instantiate from Level library (your implementation)).\
\ <mark style="color:green;">**MenuScene**</mark> is optional scene that will be if you use main menu scene in your game.

## Workflow in scenes

Each scene after *<mark style="color:green;">**\_Loader**</mark>* must have <mark style="color:blue;">**LifetimeScope**</mark> (DI container) implementation. We use it as scene controller which has references to core systems of scene and registers it and also runs them on start by game conditions.

## Folders

<mark style="color:purple;">**Assets/\_Main/**</mark>\
It's heart of your project,\
here will be stuff related to project: scripts, animations, art, prefabs - custom implementations for each game.\
\ <mark style="color:purple;">**Assets**</mark>*<mark style="color:purple;">**/\_Examples/**</mark>*\
Here you can find all examples of system and package usage in init project.\
\ <mark style="color:purple;">**Assets/\_Main/Scripts/Common/**</mark> contains base/init project common scripts, each folder has it's own assembly definition.\
\ <mark style="color:purple;">**Assets/\_Main/Scripts/GameCore/**</mark>\
Your custom scripts for project should be here. Also here you can find core scripts that comes with this base/init project.\
\ <mark style="color:purple;">**Assets/\_Main/Scripts/Editor/**</mark>\
Your custom **Editor** scripts for project should be here. Also here you can find core scripts that comes with this base/init project.\
\ <mark style="color:purple;">**Assets/\_Main/Sprites/**</mark>\
Any sprite you should put here, <mark style="color:red;">**AssetProcessor will convert any imported file in this folder to**</mark><mark style="color:red;">**&#x20;**</mark>*<mark style="color:red;">**Sprite**</mark>*, so it will speed up time on setting type of imported image. Sprites for UI, SpriteRenderer should be here.\
\ <mark style="color:purple;">**Assets/\_Main/Scenes/**</mark>\
Here will be all game scenes that core game loop uses. You can add here also test scenes (Art preview scene and etc).\
\ <mark style="color:purple;">**Assets/\_Main/Configs/**</mark>\
Here should be ScriptableObject configs, AudioMixer config and etc.\
\ <mark style="color:purple;">**Assets/\_Main/Materials/**</mark>\
Here will be textures, shaders and materials for objects.\
\ <mark style="color:purple;">**Assets/\_Main/Prefabs/**</mark>\
Here will be all prefabs. You can create subfolders for prefab types, for example\
&#x20;                                        <mark style="color:blue;">**Assets/\_Main/Prefabs/PlayerTools**</mark> - for all player tools.\
\ <mark style="color:purple;">**Assets/**</mark>\
Here will be stuff that comes from different unity asset packages, SDKs and etc.
