Google News
logo
Unity - Interview Questions
What is difference between Resources and StreamingAssets Folder?
The main difference between the "Resources" folder and the "StreamingAssets" folder in Unity is how they are accessed and used within the application.

The "Resources" folder is used to store assets that are loaded dynamically at runtime using the "Resources" API. These assets are typically accessed through a string path and can be loaded from any folder within the "Resources" folder hierarchy.

The "Resources" folder is mainly used for assets that are not required during the initial build but are needed during runtime, such as audio clips, prefabs, and textures.

The "StreamingAssets" folder is used to store data files that are included with the build and can be accessed using the file system. This folder is mainly used for assets that are required during the initial build and do not need to be modified at runtime, such as configuration files, XML files, and JSON files.

Unlike the "Resources" folder, the files within the "StreamingAssets" folder are not compressed and can be accessed using the WWW class or the UnityWebRequest API.
Advertisement