Complete the code to start a WebGL build in Unity using the BuildPipeline.
BuildPipeline.BuildPlayer(scenes, outputPath, BuildTarget.[1], BuildOptions.None);
Use BuildTarget.WebGL to specify a WebGL build in Unity.
Complete the code to specify the output folder for the WebGL build.
string outputPath = "[1]";
The output path is usually a folder like Builds/WebGLBuild where the WebGL files will be saved.
Fix the error in the code to build WebGL with scenes array.
string[] scenes = {"Assets/Scene1.unity", "Assets/Scene2.unity"};
BuildPipeline.BuildPlayer(scenes, outputPath, BuildTarget.[1], BuildOptions.None);The BuildTarget enum is case-sensitive and must be exactly 'WebGL'.
Fill both blanks to set build options for a development WebGL build with auto-connect profiler.
BuildOptions options = BuildOptions.[1] | BuildOptions.[2];
Use BuildOptions.Development and BuildOptions.AutoConnectProfiler combined with bitwise OR for development builds with profiler.
Fill all three blanks to create a dictionary mapping scene names to their build indices for WebGL build.
var sceneIndices = new Dictionary<string, int> {
{"[1]", [2],
{"[3]", 1}
};The dictionary maps scene names like 'MainScene' and 'MenuScene' to their build indices 0 and 1 respectively.