Under Construction
Unity••14 min•102 views••

Games under 150 MB need Local Addressables?

Minh Khoa

Minh Khoa

Author

image.pngYes, if a rarely used feature causes the startup scene to load large assets early. For assets used for almost the entire play session, direct references are often simpler. The 150 threshold MB indicates the release size limit. To decide how to load assets, I care about two other numbers — memory when entering the lobby and the time it takes to open the feature for the first time.

1. The popup is not open, but the texture may already be in memory

Suppose UIManager the lobby scene keeps a field GameObject pointing to a prefab ShopPopup. The popup displays sprites taken from ShopAtlas. Unity has a direct reference chain from the lobby to this texture.

Lobby → UIManager → ShopPopup → ShopAtlas

Moving the Instantiate(shopPopup) command to when the player clicks the button only moves the moment the instance is created. The reference chain in the scene still remains, so the atlas can still be loaded as soon as you enter the lobby. If the texture uses the runtime format RGBA32 at a size of 2048 × 2048, the first mip level alone already occupies 16 MiB. This is the pixel data size in that format, independent of the source PNG file size. Unity Manual — Direct references · Unity API — RGBA32

2. Separate Shop from the lobby lifecycle

Put ShopPopup into a Local group and change the field of UIManager to AssetReferenceGameObject. The bundle still ships with the installation, so players can open Shop while offline. The change is in when the prefab and its dependencies are loaded. Unity Addressables — Asset dependencies

  • When entering the lobby, UIManager only keep the reference key. Also check the Shop button icon. If the icon uses a sprite from the same ShopAtlasthere is still another path that causes the lobby to load the atlas.

  • When opening Shopcall Addressables.InstantiateAsync(shopReference, parent). The dependency loading part runs asynchronously, while the instance creation step runs synchronously. A prefab with heavy Awake() logic CPU can still slow down the frame that opens Shop. Unity API — InstantiateAsync

  • When finished usingwith trackHandle = true the default setting, call Addressables.ReleaseInstance(instance). If the bundle is still used by other assets, the texture may remain in memory. If Shop is reopened after every match, keeping the instance for reuse may cost less than releasing it and loading it again. Unity Addressables — Memory management

3. Measure one prefab before changing the whole project

Compare two builds on the same device. Build A keeps direct references. Build B only moves Shop to Local Addressables. For each build, take a snapshot when the lobby has stabilized, Shop is open and Shop is closed. Find ShopAtlas in all three snapshots. If build B still loads the atlas at the lobby, the Referenced By section helps trace back to the object holding the reference. In a separate run, measure the time from the button click to the first frame Shop is displayed. Unity Memory Profiler — Snapshots · Referenced By

I would separate Shop if build B reduces memory in the lobby and the first open still meets UI's responsiveness target. If the board scene also uses that atlas throughout the session, moving only the Shop prefab will not deliver the expected memory savings.