# Preload Layout
Grammar — Preload file|Layout File queue|Immediately/For Next Map
Flags —Native
|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> — Filebool
<preset::PreloadQueue> — Queue
Returns — void
native void PreloadLayout(string path, bool queue);
# Related
Category: Game / Preloading
- Preload Asset —
void
— PreloadAsset - Preload Image —
void
— PreloadImage - Preload Layout —
void
— PreloadLayout - Preload Model —
void
— PreloadModel - Preload Model Animation —
void
— libNtve_gf_PreloadModelAnimation - Preload Model Object —
void
— libNtve_gf_PreloadModelObject - Preload Movie —
void
— PreloadMovie - Preload Object —
void
— PreloadObject - Preload Scene —
void
— PreloadScene - Preload Script —
void
— PreloadScript - Preload Sound —
void
— PreloadSound - Preload Sound Object —
void
— libNtve_gf_PreloadSoundObject - Preload Soundtrack —
void
— libNtve_gf_PreloadSoundtrack - Preload Unit —
void
— libNtve_gf_PreloadUnit
# Examples
campaigns/voidstory.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2084
}
else if ((lp_mission == "SC2Epilogue02")) {
PreloadLayout("UI\\Layout\\UI\\PlanetPanel.SC2Layout", false);
}
else if (true) {
campaigns/voidstory.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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);