# Preload Layout

Grammar — Preload file|Layout File queue|Immediately/For Next Map
FlagsNative | Action

Preloads a layout file. The file must be explicitly identified (it won’t work if you plug in a variable to that parameter). Preloading will force an asset or data entry to be loaded into memory before the map starts, rather than be loaded on demand as the map runs.

# Arguments

  • string<filepath> — File
  • bool<preset::PreloadQueue> — Queue

Returns — void

native void PreloadLayout(string path, bool queue);

Category: Game / Preloading

# Examples

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:994

    // Automatic Variable Declarations
    // Implementation
    PreloadLayout("UI\\Layout\\Custom\\LotV_ArmyUpgradeUI.SC2Layout", false);
    PreloadAsset("Cutscenes\\UI_ArmyUnits.SC2Cutscene", false);
}

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2078

    ConversationDataPreloadLines(libVoiC_gf_MissionPitch(lp_mission));
    if ((lp_mission == "PAiur01") && (lp_mission == "PAiur02") && (lp_mission == "PAiur03") && (lp_mission == "SC2Epilogue01")) {
        PreloadLayout("UI\\Layout\\Custom\\VoidShared_MissionLaunchUI2D.SC2Layout", false);
    }
    else if ((lp_mission == "SC2Epilogue03")) {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2081

    }
    else if ((lp_mission == "SC2Epilogue03")) {
        PreloadLayout("UI\\Layout\\Custom\\HotS_MissionPanel.SC2Layout", false);
    }
    else if ((lp_mission == "SC2Epilogue02")) {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2084

    }
    else if ((lp_mission == "SC2Epilogue02")) {
        PreloadLayout("UI\\Layout\\UI\\PlanetPanel.SC2Layout", false);
    }
    else if (true) {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2087

    }
    else if (true) {
        PreloadLayout("UI\\Layout\\Custom\\LotV_SoAMissionUIPanel.SC2Layout", false);
        PreloadAsset("Cutscenes\\UI_MissionLaunch.SC2Cutscene", false);
        PreloadAsset(("Cutscenes\\" + UserDataGetString("Maps", libVoiC_gf_PC_MapUserDataInstance(lp_mission), "VignetteScene", 1) + ".SC2Cutscene"), false);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2611

    // Automatic Variable Declarations
    // Implementation
    PreloadLayout("UI\\Layout\\Custom\\LotV_ShipUpgradeUI.SC2Layout", false);
    PreloadAsset("Cutscenes\\UI_ShipUpgrade.SC2Cutscene", false);
}

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:3139


    // Implementation
    PreloadLayout("UI\\Layout\\Custom\\LotV_StarmapUI.SC2Layout", false);
    PreloadAsset("Cutscenes\\UI_Starmap.SC2Cutscene", false);
    auto41CD678F_ae = CatalogEntryCount(c_gameCatalogLocation);