🌅Project structure

Scenes

_Loader scene is enter point of game. Dont rename it, because name is used in SceneSystem. 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. See how game entry systems initialize here. GameScene 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)). MenuScene is optional scene that will be if you use main menu scene in your game.

Workflow in scenes

Each scene after _Loader must have LifetimeScope (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

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

Last updated