Introducing the special folders in Unity
We already covered some of these special folders related to scripting in Unity in Chapter 2, Scripting Concepts in Unity. In this section, we will introduce the remaining special folders, which are related to asset management in Unity.
Resources folder
First, let's take a look at the Resources
folder in Unity. Resources
is a special folder name in Unity, but Unity does not automatically create a Resources
folder for you. If you want to use a Resources
folder to manage assets, you need to create it yourself. It should be noted that there can be multiple Resources
folders in the Assets
directory in a Unity project.
Unity provides the Resources.Load
method to load assets in Resources
folders. Next, we will use an example to learn how to use Resources
folders to manage assets:
- Create a new folder named
Resources
by clicking the Create | Folder item in the Project window.