

used in a scene that's included in a build) is excluded from a build. Unity is smart when it comes to including assets into your build. Var audioSource = gameObject.AddComponent() Var soundClip = Resources.Load("Sounds/" + file) Loop over the array, attach an Audio source for each sound clip and assign the Note that you do NOT need to specify file extensions while loading an asset public class ResourcesSample : MonoBehaviour This function takes a string parameter which allows you to specify the path of the file relative to the Resources folder. The primary way to load an asset from a Resources folder is to use the Resources.Load function. The contents of all 'Resources' folders are merged during compile time. The 'Resources' folder can reside anywhere inside your Assets folder, and you can have multiple folders named Resources.

The 'Resources' folder is one of only TWO ways of loading assets at runtime in Unity (The other being AssetBundles (Unity Docs) One of these folders is called 'Resources' Unity has a few 'specially named' folders that allows for a variety of uses.
