docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Move assets from the Resources system

    If your project uses the Resources system to load assets, you can migrate those assets to the Addressables system:

    1. Make the assets Addressable. To do this, either enable the Addressable option in each asset's Inspector window or drag the assets to groups in the Addressables Groups window.
    2. Change any runtime code that loads assets using the Resources API to load them with the Addressables API. For more information, refer to Load asset references.
    3. Add code to release loaded assets when no longer needed.

    If you keep all the former Resources assets in one group, the loading and memory performance is equivalent.

    When you mark an asset in a Resources folder as Addressable, the system automatically moves the asset to a new folder in your project named Resources_moved. The default address for a moved asset is the old path, omitting the folder name. For example, your loading code might change from:

    Resources.LoadAsync\<GameObject\>("desert/tank.prefab");
    

    to:

    Addressables.LoadAssetAsync\<GameObject\>("Resources_moved/tank.prefab");.
    

    Update Resources code

    You might have to implement some functionality of the Resources class differently after modifying your project to use the Addressables system.

    Replace Resources.LoadAll

    Previously, if you had assets in a folder named Resources/MyPrefabs/, you could run Resources.LoadAll\<SampleType\>("MyPrefabs") to load every asset of type SampleType in that folder. To get the same result with Addressables:

    1. Rename or move the Resources/MyPrefabs folder out of any Resources folder (Addressables ignores assets that remain under a Resources folder path) — for example to Assets/MyPrefabs.

    2. In the Project window enable the Addressable checkbox on the folder itself (not each file individually). This makes every asset under the folder Addressable, addressed as <folder address>/<relative path>.

    3. Update any keys used for loading. If you move Resources/MyPrefabs/ into Assets, you'll need to change the loading key to Assets/MyPrefabs. It should exeactly match what is listed in the Addressables Group window.

    4. Confirm Include Folder Keys in Catalog is enabled on the group's Content Packing & Loading schema (enabled by default). This makes the folder's own address load every asset inside it.

    5. Replace the load call:

      // Before
      var prefabs = Resources.LoadAll<SampleType>("MyPrefabs");
      
      // After
      var handle = Addressables.LoadAssetsAsync<SampleType>("Assets/MyPrefabs", prefab => { /* use prefab */ });
      await handle.Task;
      // or, to get the list of locations first:
      var locations = await Addressables.LoadResourceLocationsAsync("Assets/MyPrefabs", typeof(SampleType)).Task;
      
    6. Release the handle when the assets are no longer needed. Refer to Unloading Addressable assets.

    If you need finer-grained grouping than "everything in one folder" (for example, a subset of files scattered across folders), use Addressable labels instead. A label behaves the same way (one key, many assets) but isn't tied to folder structure.

    Additional resources

    • Load asset references
    • Labelling assets
    • Organize assets into groups
    • Content Packing & Loading schema
    • Resources system
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)