lecture 4:
textboxes and scenes
lecture 5:
buttons and time
lecture 6:
persistent data and high scores (johnathan)
sprites and animations
probability and accessibility
100

What is a Text or TextMeshPro component?

This Unity component is commonly used to display text

100

What Unity function is commonly used to respond to a button being clicked in the UI?

What is the OnClick() function?

100

This Unity method is called before Start() and is used to initialize objects or set up singletons

What is Awake()?

100

What is a sprite in Unity?

A sprite is a 2D graphic object used in Unity, primarily in 2D games. It represents a visual object, such as a character, background, or item. Sprites are created from textures, which are imported image files (e.g., PNG, JPG). They can be manipulated and animated within Unity using the Sprite Renderer component.


100

Mouth stick, oversized trackball mouse, adaptive keyboard.

What can help physical disabilities?

200

What is assigning text via a script (e.g., Text.text = "..." or TMP_Text.text = "...")?

To make a textbox interactive for dialogue or narration, this script-based action is often used to dynamically update its content during runtime.

200

How can you find all GameObjects in the scene with a specific tag?

What is FindObjectsWithTag()?

200

To store the top 5 high scores in a game, you would use this data structure to sort and maintain the scores

What is an array

200

How do you create an animation for a sprite in Unity?

Import the sprite or sprites into Unity.

Select the sprite(s) in the Project window.

Drag the sprite(s) into the Scene view or create an Animator Controller.

Open the Animation window (Window > Animation > Animation).

Click "Create" to make a new animation clip.

Add properties or frames by dragging different sprites or adjusting parameters like position, rotation, and scale over time.

Save the animation, and it will be automatically linked to the Animator Controller.

200

The software can highlighting text and playing audio simultaneously

What is text-to-speech software?

300

What is a scene?

This is the term for a collection of game objects, lights, cameras, and other elements that represent a single part of the game world.

300

Which Unity method can be used to enable or disable a GameObject in the scene?

What is [GameObject].SetActive(true/false)?

300

DontDestroyOnLoad()

What method allows an object to persist scene to scene

300

What is the difference between Sprite Renderer and Animator in Unity?

Sprite Renderer: Displays the sprite in the Scene. It controls properties like the sprite's appearance, including its color, flip (horizontal/vertical), and sorting layer.

Animator: Handles animation logic. It uses an Animator Controller to define animation states and transitions, managing how the sprite changes over time (e.g., walking, idle).

300

The probability of all possible outcomes of a random event sums to 1

What is the total probability theorem?

400

What is the RectTransform?

Used to design and place UI elements like textboxes, buttons, and images in a visually intuitive way.


400

How can you control the speed of the game using Unity’s time system?

What is Time.timeScale?

400

This Unity class allows you to store simple data types like integers, floats, and strings between game sessions, but it is not secure for sensitive information

What is playerPrefs()

400

How do you loop an animation in Unity?

Select the animation clip in the Project window.

In the Inspector, enable the checkbox labeled "Loop Time" under the Clip settings.

If the animation is part of an Animator Controller, ensure the transition settings in the Animator allow for a continuous loop.

This will ensure the animation repeats indefinitely until stopped.

400

Bayes' Theorem

What is conditional probability?

500

What is a Canvas or Canvas Scaler?

To ensure text scales appropriately across different screen resolutions, developers often use this Unity layout feature.

500

How can you pause and resume a game using Unity’s Time system?

What is setting Time.timeScale = 0 to pause and Time.timeScale = 1 to resume?

500

PlayerPrefs.SetInt("HighScore", 1000);

What line of code saves an integer high score of 1000 using PlayerPrefs

500

How can you flip a sprite in Unity without using code?


You can flip a sprite in Unity without code by adjusting the Flip X or Flip Y property in the Sprite Renderer component.


Select the GameObject with the sprite in the Scene or Hierarchy.

In the Inspector, find the Sprite Renderer component.

Check the Flip X box to flip the sprite horizontally, or the Flip Y box to flip it vertically.

This method is useful for quickly changing the orientation of a sprite during design time.


500

Determine the probability of a sequence of independent events, such as flipping a coin multiple times.

What is the multiplication rule of probability?