Complete the code to set the build target to Android in Unity.
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Android, [1]);To build for Android, you must switch the active build target to BuildTarget.Android.
Complete the code to set the build target to iOS in Unity.
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.iOS, [1]);To build for iOS, you must switch the active build target to BuildTarget.iOS.
Fix the error in the code to build an Android player.
BuildPipeline.BuildPlayer(scenes, path, [1], BuildOptions.None);
The build target must be BuildTarget.Android to build an Android player.
Fill both blanks to create a dictionary comprehension that maps scene names to their build index if the index is greater than 0.
var sceneDict = new Dictionary<string, int> { { [1], [2] } };The dictionary maps the scene name "MainScene" to build index 1, which is greater than 0.
Fill all three blanks to build an iOS player with development build option.
BuildPipeline.BuildPlayer([1], [2], [3], BuildOptions.Development);
The method requires the scenes array, the output path, and the build target for iOS.