While we play the game, it always need to create different kind of objects. Chips, particle effects, obstacles, etc. But how the game knows what kind of asset to use and when? Asset Manager is a pretty simple tool that solves this task. It allows us to collect all necessary assets in one place and to have possibility easy to use them in the code. It the same time using this tool we always see full list of assets we use and also can to edit them fast.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d91b82e8-ed98-462a-acc8-7f7a3354aa2c/unnamed0.png

All the assets in the Asset Manager must have unique names, because their names are being used as unique keys for getting access. Also there can be not only prefabs, it also can to contain sprites, textures, materials and any other asset types. But only prefab assets can be used for emitting new instances. There is also a special MonoBehaivour component that is designed to be used in the Asset Manager. It is called ContextedBehaviour - instances of this component (and all inheritors) have a reference to original assets, they can be easy found runtime because they are put into special context and have more other features.

Interface

Lets look how it looks like in Unity. Just open the Dashboard and click on Assets tab.

Untitled

The interface is very simple: there is toolbar with few buttons and search field. The buttons allows to create new asset folders and sort assets by name. And the biggest part of the view is the asset list. All the elements in the list are real files. As for the groups (folders), they are made just for assets structuring.

All the assets can be easy edited. Just select an asset you want to edit and it will be selected in the Project and in the Inspector view. New assets can be added by drag and drop. Just move the asset from the Project view into this list.