0
0
Unityframework~10 mins

Skybox and environment in Unity - Interactive Code Practice

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

Complete the code to set the skybox material in Unity.

Unity
RenderSettings.skybox = [1];
Drag options to blanks, or click blank then click option'
AmySkyboxMaterial
BCamera.main
CGameObject
DLight
Attempts:
3 left
💡 Hint
Common Mistakes
Using a GameObject or Camera instead of a Material.
Trying to assign a light or other component.
2fill in blank
medium

Complete the code to change the ambient light color in Unity.

Unity
RenderSettings.ambientLight = [1];
Drag options to blanks, or click blank then click option'
AQuaternion.identity
BColor.red
CVector3.one
Dnew GameObject()
Attempts:
3 left
💡 Hint
Common Mistakes
Using a vector or quaternion instead of a color.
Trying to assign a GameObject.
3fill in blank
hard

Fix the error in the code to correctly set the skybox tint color.

Unity
RenderSettings.skybox.SetColor("_Tint", [1]);
Drag options to blanks, or click blank then click option'
AColor.blue
Bnew Vector3(1, 1, 1)
CQuaternion.Euler(0, 0, 0)
Dnew GameObject()
Attempts:
3 left
💡 Hint
Common Mistakes
Passing a Vector3 or Quaternion instead of a Color.
Trying to pass a GameObject.
4fill in blank
hard

Fill both blanks to create a skybox material and assign it to the scene.

Unity
Material [1] = new Material(Shader.Find([2]));
RenderSettings.skybox = skyboxMaterial;
Drag options to blanks, or click blank then click option'
AskyboxMaterial
B"Standard"
C"Skybox/Cubemap"
Dnew Material()
Attempts:
3 left
💡 Hint
Common Mistakes
Using an incorrect shader name.
Using a wrong variable name or type.
5fill in blank
hard

Fill all three blanks to set a procedural skybox with a blue tint and assign it.

Unity
Material [1] = new Material(Shader.Find([2]));
[1].SetColor("_SkyTint", Color.blue);
RenderSettings.skybox = [1];
Drag options to blanks, or click blank then click option'
AproceduralSkybox
B"Skybox/Procedural"
D"Standard"
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong shader name.
Not using the same variable name consistently.