Mock test
- If you want to keep a private variable visible in the Inspector window, which attributes should you put above the variable in your code?
[Header]
[SerializeField]
[AddComponentMenu]
[Tooltip]
- You have created a pinball game for a mobile device; the game mechanics all work well but you also need to apply a pause screen. Obviously, when the player presses pause, the entire game should freeze. The way you are going to achieve this is by setting Unity's
timeScale
to zero.
Which time property isn't affected when we set Time.timeScale
to 0
?
captureFramerate
frameCount
realtimeSinceStartup
timeSinceLevelLoad
- There is a list of scenes in your
BuildSettings
window. You know that the first scene is your title scene and that the rest that follow are your game's level scenes. Your game designer hasn't settled on the names of the scenes and keeps changing them. As a programmer, you can select the scenes to load by using what...