This is your first mini mock test. These tests represent sections of your final Unity exam. This first mini mock test consists of just five questions. Later on in this book, we'll introduce more mini mock tests with more questions.
Fortunately, you will only be tested on what we have covered so far:
- You have been asked to develop a horror survival game where your player relies on a pocket torch. Here is what you've coded so far:
void Start()
{
Light playersTorch = GetComponent<Light>();
playersTorch.lightMapBakeType = LightMapBakeType.Mixed;
playersTorch.type = LightType.Area;
playersTorch.shadows = LightShadows.Soft;
playersTorch.range = 5f;
}
You notice, however, that the player's torch isn't casting any light or shadows. What should you change for this code to work as desired?
A) Set playersTorch.lightBakeType to LightmapBakeType.Realtime.
B) Set playersTorch...