# Preload Scene

Grammar — Preload file|Scene File queue|Immediately/For Next Map
FlagsNative | 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

Returns — void

native void PreloadScene(string path, bool queue);

Category: Game / Preloading

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// 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

Lib281DEC45.galaxy

// L414
PreloadScene("Cutscenes\\zScripted_ZAdjutantIntro.SC2Cutscene", false)