# 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.sc2campaign

VoidCampaignUILib.galaxy

// L994
PreloadLayout("UI\\Layout\\Custom\\LotV_ArmyUpgradeUI.SC2Layout", false)
// L2078
PreloadLayout("UI\\Layout\\Custom\\VoidShared_MissionLaunchUI2D.SC2Layout", false)
// L2081
PreloadLayout("UI\\Layout\\Custom\\HotS_MissionPanel.SC2Layout", false)
// L2084
PreloadLayout("UI\\Layout\\UI\\PlanetPanel.SC2Layout", false)
// L2087
PreloadLayout("UI\\Layout\\Custom\\LotV_SoAMissionUIPanel.SC2Layout", false)
// L2611
PreloadLayout("UI\\Layout\\Custom\\LotV_ShipUpgradeUI.SC2Layout", false)
// L3139
PreloadLayout("UI\\Layout\\Custom\\LotV_StarmapUI.SC2Layout", false)