What’s the difference between Resources and Local Addressables if both are loaded by code?
Minh Khoa
Author
Suppose the game has a prefab ShopPopupYou can place it in the Resourcesfolder, then call Resources.LoadAsync when the player opens the Shop. You can also put the prefab into Local Addressables and call Addressables.LoadAssetAsync at exactly that time.
Both can load assets on demand. The noteworthy difference lies in how assets are packaged and how they are managed after loading.
When the game has just launched, where is the prefab located?
In both approaches, the prefab data is stored on the device with the installation.
-
With ResourcesUnity puts assets in folders named
Resourcesinto the Player build data, including assets not referenced by any scene. -
With Local AddressablesUnity packages assets into AssetBundle according to the configuration. Local bundles are included in the installation so the game can use them offline. Unity — Resources · Addressables — Asset dependencies
If the startup scene does not reference ShopPopup or its assets, and the code has not requested loading yet, then the Shop prefab and its separate texture do not need to be in memory.
Conversely, if a button in the lobby is using that same texture, the texture may already have been loaded through the button’s reference path. To know whether an asset is in memory or not, you need to look at which object is using itin addition to how you organize files in the project.
Both support asynchronous loading
The following two calls correspond to two separate storage approaches.
// Prefab nằm tại Assets/Resources/UI/ShopPopup.prefab
var request = Resources.LoadAsync<GameObject>("UI/ShopPopup");
// Prefab được đánh dấu Addressable với address "ShopPopup"
var handle = Addressables.LoadAssetAsync<GameObject>("ShopPopup");
Both commands start a loading task. When the task completes, the code can then obtain the prefab for use. To display a popup, you also have to instantiate it and initialize the UI.
Resources also has Load synchronous and LoadAsync asynchronous. So asynchronous loading capability alone is not enough to distinguish the two systems. Unity API — Resources.LoadAsync
How do the startup costs differ?
Resources has index data that helps Unity find assets by path. This data is packaged during the build, and the Resources system incurs initialization and memory costs for lookup structures. The cost increases with the number of objects that need to be managed, even when many assets have not yet been loaded for use. Therefore, a large Resources setup can affect startup time. Unity — Resources and initialization cost
Addressables also needs to initialize its system and read the catalog to determine asset locations and dependencies. By default, initialization happens when you call API Addressables for the first time. You can proactively call InitializeAsync earlier to prepare. Unity — Addressables initialization
If the first time opening the Shop is also the first Addressables call, the wait time can include both Addressables initialization and prefab loading. If initialization is done in advance, part of the work has been shifted to another time. Actual speed also depends on asset size, bundle packing, compression configuration, and the device.
A clearer difference appears when closing the Shop
With Resourcesyou manage references to assets and when to release them. Unity provides Resources.UnloadUnusedAssets() to reclaim assets that are no longer in use. For individual assets such as textures, you can use Resources.UnloadAsset() once you have ensured that other objects no longer need it. Destroying a popup instance is not enough to conclude that all of the popup’s textures have been released. Unity API — UnloadUnusedAssets · UnloadAsset
With Addressableseach load needs a corresponding release when use ends. The system uses a reference count to track the uses it manages, including dependencies. When you load a prefab and then instantiate it yourself, you need to retain the right to use the asset for as long as those instances still need resources.
However, release decreases the reference count first. The asset may remain in memory if the bundle containing it is still being used by another asset. This is why bundle partitioning directly affects memory release capability. Unity — Addressables memory management
Choose based on your resource management needs
| Project needs | The appropriate way to start |
|---|---|
| A small group of config, prefab, or icon assets, with a simple lifecycle | Resources |
| Many content groups need to be loaded and released by screen or feature | Local Addressables |
| Need control over how assets are split into bundles and dependency tracking | Local Addressables |
For the Shop example, compare the two builds on the same device. Measure the time to enter the lobby, the time to open the Shop for the first time and memory before opening, after opening, and after closing the Shop.
If the goal is only to delay loading a prefab until the player presses a button, both approaches can do that. When the amount of content grows and each group has a different lifecycle, Addressables’ ability to organize bundles and manage loads becomes more valuable.}]} %n'}]}to=final अवस्थामा to=final code? Markdown? Wait final JSON corrupted due accidental extra. Need correct valid JSON only. Let's craft clean.Be careful with content segments 26 etc not perfect? Let's ensure translations faithful. Need valid JSON. Let's produce. to=final 天天彩票网json{ load/release title_segments?` No. Let's deliver proper JSON object only. Need no markdown fences? schema expects JSON. Let's provide plain JSON. But ensure no accidental brace mismatch. Let's rewrite carefully.் to=final 夫妻性生活影片{