# Preload Scene
Grammar — Preload file|Scene File queue|Immediately/For Next Map
Flags —Native
|Action
Preloads a scene 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
— Filebool
[ preset::PreloadQueue ] — Queue
Returns — void
native void PreloadScene(string path, bool queue);
# Related
Category: Game / Preloading
- [F] —
void
— Preload Asset — ( PreloadAsset ) - [F] —
void
— Preload Image — ( PreloadImage ) - [F] —
void
— Preload Layout — ( PreloadLayout ) - [F] —
void
— Preload Model — ( PreloadModel ) - [F] —
void
— Preload Model Animation — ( libNtve_gf_PreloadModelAnimation ) - [F] —
void
— Preload Model Object — ( libNtve_gf_PreloadModelObject ) - [F] —
void
— Preload Movie — ( PreloadMovie ) - [F] —
void
— Preload Object — ( PreloadObject ) - [F] —
void
— Preload Scene — ( PreloadScene ) - [F] —
void
— Preload Script — ( PreloadScript ) - [F] —
void
— Preload Sound — ( PreloadSound ) - [F] —
void
— Preload Sound Object — ( libNtve_gf_PreloadSoundObject ) - [F] —
void
— Preload Soundtrack — ( libNtve_gf_PreloadSoundtrack ) - [F] —
void
— Preload Unit — ( libNtve_gf_PreloadUnit )
# Examples
# campaigns/liberty.sc2campaign
// L12304
PreloadScene(gv_sceneFile[(lp_sceneID)][lv_index], false)
// L12304
PreloadScene(gv_sceneFile[(lp_sceneID)][lv_index], false)
// L102
PreloadScene("Cutscenes/zDebrief_Lab01.SC2Cutscene", false)
// L102
PreloadScene("Cutscenes/zDebrief_Lab01.SC2Cutscene", false)
# campaigns/swarmstoryutil.sc2mod
// L414
PreloadScene("Cutscenes\\zScripted_ZAdjutantIntro.SC2Cutscene", false)