Legacy Documentation: Version 5.2
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

EditorUserBuildSettings.webGLOptimizationLevel

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual
public static var webGLOptimizationLevel: int;
public static int webGLOptimizationLevel;

Description

Optimization level for WebGL.

This is the optimization level passed to the emscripten compiler for WebGL builds (-On command line option). 1 results in slow performance but faster builds (recommended for iterating on problems). 2 results in fast performance but takes longer to build. 3 is slightly faster then 2, but takes very long to build (only recommended for final release builds).