{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreihujcprvpi3f7oltwi6hxtwtahgapdw7mdxsuue6x55diiwspybhy",
    "uri": "at://did:plc:25rdn5elo5izoxrmtis34zuk/app.bsky.feed.post/3monb3ibjpfu2"
  },
  "coverImage": {
    "$type": "blob",
    "ref": {
      "$link": "bafkreieq26je3w4xvtrmwhhsswqwkfc7hvaxsvqp54srejgiskhyeexxsa"
    },
    "mimeType": "image/webp",
    "size": 50910
  },
  "path": "/gamedevtoollab/fast-file-loading-techniques-in-unity-2131",
  "publishedAt": "2026-06-19T11:26:02.000Z",
  "site": "https://dev.to",
  "tags": [
    "unity3d",
    "performance",
    "addressable"
  ],
  "textContent": "##  Temporarily Switch to 60 FPS During Loading and Load Multiple Files in Parallel\n\nEven if your main gameplay runs at 30 FPS or another frame rate lower than 60 FPS, temporarily switching to 60 FPS during loading can improve loading times when reading multiple files.\n\nAlso, when loading multiple files, it is more efficient to start all load operations first and then wait for all of them to finish, rather than waiting for each one sequentially.\n\n\n\n    using System.Threading.Tasks;\n    using UnityEngine;\n    using UnityEngine.AddressableAssets;\n\n    public class LoadSample : MonoBehaviour\n    {\n        async void Start()\n        {\n            int prevFps = Application.targetFrameRate;\n            int prevVSync = QualitySettings.vSyncCount;\n\n            // Switch to 60 FPS only during loading\n            QualitySettings.vSyncCount = 0;\n            Application.targetFrameRate = 60;\n\n            // Start multiple load operations at the same time\n            var playerTask = Addressables.LoadAssetAsync<GameObject>(\"Player\").Task;\n            var enemyTask  = Addressables.LoadAssetAsync<GameObject>(\"Enemy\").Task;\n            var uiTask     = Addressables.LoadAssetAsync<GameObject>(\"BattleUI\").Task;\n\n            // Wait until all load operations are complete\n            await Task.WhenAll(playerTask, enemyTask, uiTask);\n\n            var playerPrefab = playerTask.Result;\n            var enemyPrefab  = enemyTask.Result;\n            var uiPrefab     = uiTask.Result;\n\n            // Restore the FPS settings after loading is complete\n            Application.targetFrameRate = prevFps;\n            QualitySettings.vSyncCount = prevVSync;\n\n            Instantiate(playerPrefab);\n            Instantiate(enemyPrefab);\n            Instantiate(uiPrefab);\n        }\n    }\n\n\nThere are two key points.\n\n\n\n    // Start everything first\n    var taskA = LoadA();\n    var taskB = LoadB();\n    var taskC = LoadC();\n\n    // Then wait for all of them at the end\n    await Task.WhenAll(taskA, taskB, taskC);\n\n\nIf you load them sequentially, like this:\n\n\n\n    await LoadA();\n    await LoadB();\n    await LoadC();\n\n\nthe waiting time accumulates.\n\nOn the other hand, if the load operations do not depend on each other, starting them at the same time and waiting for all of them together may reduce the total loading time.\n\nHowever, loading many large assets at the same time can increase memory usage or cause spikes during asset expansion, so it is better to group them reasonably by screen or use case.\n\n##  Run Network Requests and File Loading at the Same Time\n\nWhen transitioning to a specific screen, you may need both of the following:\n\n  * Fetch data from a network API\n  * Load the prefab used to build the screen\n\n\n\nIf you load the prefab only after the network request finishes, the waiting time is added together.\n\n\n\n    var apiResult = await CallApi();\n    var prefab = await LoadPrefab();\n\n\nIf the network request and the loading process do not depend on each other, it is more efficient to start them at the same time.\n\n\n\n    var apiTask = CallApi();\n    var prefabTask = LoadPrefab();\n\n    await Task.WhenAll(apiTask, prefabTask);\n\n    var apiResult = apiTask.Result;\n    var prefab = prefabTask.Result;\n\n\nBecause the waiting time for the network request and the file loading overlaps, you can reduce the amount of time the user has to wait.",
  "title": "Fast File Loading Techniques in Unity"
}