Quiz: Manage scene flow and data

Quiz

Beginner

+180 XP

40m

Unity Technologies

Quiz: Manage scene flow and data thumbnail

This quiz will assess your understanding of the concepts covered in the Junior Programmer: Manage scene flow and data mission.

Question 1

Which of the following is considered a Version Control solution?

Select only one

Question 2

Which of the following is not typically done by a version control solution?

Select only one

Question 3

When would a “merge conflict” arise?

Select only one

Question 4

What does it mean to “checkout a branch” within a version control solution?

Select only one

Question 5

What is a “commit message” within a version control solution?

Select only one

Question 6

Which of the following would represent a typical workflow with a version control solution?

Select only one

Question 7

In Unity’s Scripting reference, the following is shown for the LoadScene function: SceneManager.LoadScene

  • public static void LoadScene(int sceneBuildIndex, SceneManagement.LoadSceneMode mode = LoadSceneMode.Single);
  • public static void LoadScene(string sceneName, SceneManagement.LoadSceneMode mode = LoadSceneMode.Single);

Which of the following would be a valid implementation of the LoadScene method?

Select only one

Question 8

When would you want to use the DontDestroyOnLoad function?

Select only one

Question 9

The following code is intended to reload the scene every 3 seconds, then display the number of times it has reloaded in the console with “Reload number 0”, then “Reload number 1”, “Reload number 2”, etc. every time it is reloaded.

public int reloadNumber = 0;

void Start()
{   
  Debug.Log("Reload number " + reloadNumber);   
  reloadNumber++;
  StartCoroutine(WaitAndReload()); 
}   

IEnumerator WaitAndReload()
{
  yield return new WaitForSeconds(3);
  SceneManager.LoadScene (SceneManager.GetActiveScene().name); 
}

However, the increased reloadNumber variable is not being retained when the scene is reloaded, so it prints “Reload number 0” every time instead of incrementing it by 1 every time. What change would need to be made in order to make the program work as desired?

Select only one

Question 10

The below is an example of the Singleton design pattern implemented for a GameManager:

public class GameManager : MonoBehaviour 
{
   void Awake()
   {     
      if (Instance == null)
      {       
         Instance = this;
         DontDestroyOnLoad(gameObject);
      }    
      else     
      {       
         Destroy(gameObject);
      }     
   } 
       
   public static GameManager Instance { get; private set; }
   
}

Which of the following is true about this class?

Select only one

Submit answers

To calculate your score, submit your answers to the quiz. A passing score will mark this quiz complete.

Correct answers needed to pass

8/10

Retake allowed after

0 Mins