0
0
Unityframework~10 mins

Why cross-platform deployment matters in Unity - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to print a message about cross-platform deployment.

Unity
Debug.Log("Cross-platform deployment is [1] important for reaching more users.");
Drag options to blanks, or click blank then click option'
Asometimes
Brarely
Cnever
Dvery
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing words that downplay importance like 'rarely' or 'never'.
2fill in blank
medium

Complete the code to check if the current platform is supported.

Unity
if (Application.platform == RuntimePlatform.[1]) {
    Debug.Log("Platform supported.");
}
Drag options to blanks, or click blank then click option'
AWindowsPlayer
BLinuxEditor
CAndroid
DOSXEditor
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing editor platforms instead of player platforms.
3fill in blank
hard

Fix the error in the code that builds for multiple platforms.

Unity
BuildPipeline.BuildPlayer(scenes, path, BuildTarget.[1], BuildOptions.None);
Drag options to blanks, or click blank then click option'
AStandaloneWindows64
BWebGL
CiOSSimulator
DAndroidTV
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing simulator or TV platforms that may not be supported for build.
4fill in blank
hard

Fill both blanks to create a dictionary mapping platforms to build paths.

Unity
var buildPaths = new Dictionary<BuildTarget, string> {
    { BuildTarget.[1], "Builds/Windows" },
    { BuildTarget.[2], "Builds/Android" }
};
Drag options to blanks, or click blank then click option'
AStandaloneWindows64
BWebGL
CAndroid
DiOS
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up platform names or using unsupported targets.
5fill in blank
hard

Fill all three blanks to filter scenes for a specific platform build.

Unity
var filteredScenes = scenes.Where(scene => scene.path.EndsWith(".unity") && scene.platform == BuildTarget.[1] && scene.enabled == [2]).Select(scene => scene.path).ToList();

if (filteredScenes.Count [3] 0) {
    Debug.Log("Scenes ready for build.");
}
Drag options to blanks, or click blank then click option'
AStandaloneWindows64
Btrue
C>
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using false instead of true for enabled scenes.
Using less than or equal instead of greater than for count check.