Textboxes and Scenes
Buttons and Time
Persistent Data and High Scores
Probability
Accessibility
100

What Unity UI component is commonly used to display text in a scene?

TextMeshPro or UI Text

100

What Unity component is essential for detecting clicks on UI buttons?

Button

100

What Unity method is used to ensure that a script persists between scenes?

DontDestroyOnLoad()

100

In Unity, what function is used to generate a random float number between two values?

Random.Range(float min, float max)

100

What Unity component can make it easier for visually impaired players to navigate menus?

Screen reader support or accessible UI components with text-to-speech features.

200

Which Unity function is used to load a new scene?

SceneManager.LoadScene() 


200

Which Unity method is used to find all GameObjects with a specific tag?

GameObject.FindObjectsWithTag()

200

What is the purpose of the Awake() method in Unity?

It initializes data or references before the Start() method is called.

200

If you want a 25% chance of an event occurring, how would you implement this using Unity?

Use Random.Range(0f, 1f), and check if the result is less than or equal to 0.25f.

200

How can colorblind players be accommodated in a Unity game?

By using colorblind-friendly palettes and providing alternative visual indicators, such as patterns or symbols.

300

What is the purpose of SceneManager.GetActiveScene().buildIndex?

It retrieves the build index of the currently active scene.

300

What does GameObject.SetActive(false) do?

It deactivates the GameObject, making it invisible and stopping any scripts attached to it.

300

How do you save an integer value in PlayerPrefs?

PlayerPrefs.SetInt("KeyName", value);

300

How can you simulate a weighted random selection in Unity?

Use an array of weights, calculate cumulative probabilities, and map a random number to a range based on the weights.

300

What is one way to ensure audio cues are accessible to hearing-impaired players?

Include subtitles or visual cues that correspond to the audio.

400

Before switching between scenes in Unity, where must they be added for them to load properly?

Scenes must be added to the Build Settings.

400

How can you pause the game in Unity?

By setting Time.timeScale to 0.

400

How would you retrieve a high score from PlayerPrefs, with a default value of 0 if it doesn’t exist?

PlayerPrefs.GetInt("HighScore", 0);

400

How do you use random numbers to create varied enemy spawn points?

Randomly choose a position from an array of predefined spawn locations or use Random.Range() for continuous space.

400

How can you make controls in a Unity game more accessible?

Allow players to remap controls to suit their needs.

500

How do you set up a UI button in Unity to call a specific method when clicked?

Assign the button’s OnClick event to the desired method in the Inspector by dragging the GameObject with the script into the event slot and selecting the method.

500

How can you resume a game after pausing it in Unity?

By setting Time.timeScale back to 1.

500

Outline a basic algorithm to store the top 5 high scores in a Unity game.

Store scores in a list, sort it in descending order, and keep only the top 5 scores. Save the scores using PlayerPrefs or another persistent method.

500

Describe a method to ensure fair probability over time (e.g., each item in a loot box has equal chance over many trials).

Use a reservoir sampling or shuffle algorithm to randomly assign probabilities while maintaining fairness.

500

What is an accessibility feature to consider for players with limited mobility?

Implementing one-button gameplay or adaptive controller support.

M
e
n
u