Unity automatically imports assets and manages various kinds of additional data about them for you. Below is a description of how this process works.
When you place an Asset such as a texture in the Assets folder, Unity will first detect that a new file has been added (the editor frequently checks the contents of the Assets folder against the list of assets it already knows about). Once a unique ID value has been assigned to the asset to enable it to be accessed internally, it will be imported and processed. The asset that you actually see in the Project panel is the result of that processing and its data contents will typically be different to those of the original asset. For example, a texture may be present in the Assets folder as a PNG file but will be converted to an internal format after import and processing.
Using an internal format for assets allows Unity to have game-ready versions of your assets to use at runtime in the editor, while keeping your unmodified source files in the the assets folder so that you can quickly edit them and have those changes automatically picked up by the editor. For example, the Photoshop file format is convenient to work with and can be saved directly into your Assets folder, but you wouldn’t expect it to support game engine features such as mip maps, and hardware such as mobile devices and PC graphics cards can’t accept that format directly to render as textures. Unity’s internal formats, however, can add extra functionality like this to any asset type. All the data for Unity’s internal representation of your assets is stored in the Library folder. As a user, you should never have to alter the Library folder manually and attempting to do so may affect the functioning of the project in the Unity editor. However, it is always safe to delete the Library folder (while the project is not open in Unity) as all its data is generated from what is stored in the Assets and ProjectSettings folders. This also means that the Library folder should not be included in version control.
Unity uses .meta files to store information about how your assets should be imported and processed for storage in the Library folder. As well as the unique ID assigned to the asset, the meta files contain values for all the settings you see in the inspector when you have an asset selected in your project window. For a texture, this includes settings such as the Texture Type, Wrap Mode, Filter Mode and Aniso Level.
Meta files are automatically generated by Unity, and are saved alongside your assets in the Assets folder.
Unity allows you to create folders in the Project view to help you organize assets, and those folders will be mirrored in the actual filesystem. To move assets around or rename them, it is best to do so within the Project view itself. If you use the filesystem/desktop to move/rename the files, make sure to also move/rename the respective .meta files which are found right next to the files they pertain to (if you have “Hidden Meta Files” enabled, you may have to show hidden files in Explorer/Finder). Otherwise Unity-specific data for the assets will be lost which may lead to import settings and/or links between assets not being preserved.
When backing up a project, you should always back up the main Unity project folder, containing both the Assets and ProjectSettings folders. All the information in these folders is crucial to the way Unity works. You can ignore the Library and Temp folders for backup purposes.
Note: Projects created in Unity 4.2 and earlier may not have .meta files if not explicitly enabled. Deleting the Library folder in these projects will lead to data loss and permanent project corruption because both the generated internal formats of your assets and the meta data were stored in the Library folder.
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising. Some 3rd party video providers do not allow video views without targeting cookies. If you are experiencing difficulty viewing a video, you will need to set your cookie preferences for targeting to yes if you wish to view videos from these providers. Unity does not control this.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.