UNITY Lecture 4
UNITY Lecture 5
UNITY Lectures 6 & 7
Sprite sheets & Animations
Probability & Accessibility
100

What is the function of the On-Click-Method in Unity?

Linking to a game object/scene to a button. 

100

What happens when you set Time.timeScale to 0 in Unity?

Setting Time.timeScale to 0 pauses the game by stopping all time

100

What is the purpose of PlayerPrefs in Unity?

PlayerPrefs is a simple way to store and retrieve small amounts of persistent data between game scene to scene.

100

What is a sprite sheet, and how is it different from a single sprite?

A sprite sheet is a single image file containing multiple sprites or frames arranged in a grid or sequence. And the difference is that a single sprite is a single image, while a sprite sheet combines multiple sprites, usually for animation.

100

What is the probability of rolling a 6 on a standard six-sided die?

1/6

200

In Unity, How would you add a new scene to the build settings in your game? 

Open the file in the Unity Editor, click the build setting, and move each scene(in the order that you want) in the build settings. When finished, click build. 

200

What is the purpose of FindObjectsWithTag()?

In Unity, the role of FindObjectWithTag() is to locate and retrieve all active game objects in the scene that share a specific tag.

200

How do you ensure only the top 5 high scores are stored using PlayerPrefs?

Insert new Score into the list.

Descending to sort the list.

Keep at most the top 5 Score.

Use the PlayerPrefs that saved those Score.

200

In unity, what is an animator?

a part of a game object that lets you use a state machine to control its animations

200

There are 4 red balls, 5 green balls, and 6 blue balls in a bag. What is the probability of drawing a red ball?

4/15

300

What is a UI Text Box? What is a UI Button? What is the difference between these two UI elements in Unity? 

UI Text Box is used to display text on the screen. UI Button is a button that can be used to link other game objects/scenes. The difference between these two is that the UI Text Box displays/stores text while the UI Button is interactive. 

300

What is the purpose of the OnClick() method in Unity UI Buttons?

The OnClick() method in a Unity UI button is used to define a specific action or function to be performed when the player clicks the button.

300

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

It is called before any other methods in the script for initialization.

300

What is the sprite editor?

By dividing a sprite sheet into separate frames that may be used in animations, this Unity feature makes it simpler to generate fluid, frame-by-frame motion for your objects or characters.

300

The player has a 30% chance of finding a rare weapon in every treasure chest they open. What is the probability of finding a rare weapon in exactly one of two treasure chests they open? 

70%

400

Below is a method of a script, 

private void AdvanceLevel() 

    {

        if (level < 10)

        {

            SceneManager.LoadScene(level + 1);

        }

        else 

        {

            SceneManager.LoadScene(11); 

        }

    }

In English, what does the code above do?

It checks the build index if it is less than 10 then it will load the next scene. If the build index is greater than 10, it will load scene 11.

400

How do you write a program when player find the enemy the enemy will be delete?

void OnCollisionEnter2D(Collision2D collision)    {                if(collision.gameObject.CompareTag("Enemy"))        {                      Destroy(collision.gameObject);        }    }

400

PlayerPrefs is frequently utilized in Unity for this function. Why is it commonly utilized, and what are the techniques for setting and retrieving data?

PlayerPrefs.Set<Type> to store data PlayerPrefs.Get<Type> to retrieve it

utilizing it since it offers a straightforward method of preserving basic data, like user preferences or game progress.  

400

Which component is used to manage transitions between various animations, such walking and jumping, while animating a character in Unity using a sprite sheet?

 Animator Controller?

400

Describe what are accessibilities in game design? 

This phrase describes features like adjustable controls, colorblind modes, or subtitles that are intended to make games accessible to individuals with impairments.

500

What is the default behavior when a UI Button is clicked, if you do not assign an OnClick method?

Nothing happens.

500

What is GameObject.setActive?

This method changes the visibility and functionality of a GameObject in Unity without destroying it.

500

Why would a class use a static instance to control global behavior or state? Give an example of how it could be used in a gaming environment, highlighting the function of Unity's Awake() method.

A static instance is helpful in situations like player settings, game managers, and audio managers because it enables a class to control a single, globally accessible instance. 

Code: 

private void Awake()

{

    if (instance == null)

    {

        DontDestroyOnLoad(this);

        instance = this;

    }

    else

    {

        Destroy(gameObject);

    }

}

500

The timing and transitions of sprite-based animations made from sprite sheets are managed by this Unity animation tool using keyframes.

Animation Window

500

Describe inclusive design.

By include features like remappable controllers, colorblind modes, and screen readers, this game design philosophy aims to make sure that players with physical, sensory, or cognitive limitations may still enjoy the game.

M
e
n
u