On a six-sided die, each side has a number between 1 and 6. What is the probability of throwing a 3 or a 4?
1/3 or ~33%
Change text on a button
The text field inside the child TMP_Text object.
How to create a new scene
File > New Scene
What is Unity's built-in data persistent class?
PlayerPrefs
Create Empty Object
Right Click > Create Empty
A die is rolled and a coin is tossed. Find the probability that the die shows an odd number and the coin shows a head.
1/4 or 25%
Which component to change highlight color
Button Component
A textbox need to always be in the top right.
Use Canvas
What is the difference between Awake() and Start()
Awake is called when the scene that contains the script is loaded. While Start() is called right before the first frame is loaded.
Scenes Location
Project
The working title of our game is "The Six Trials of the Hero". Right now the core mechanic is pretty simple: the player rolls a D10 each turn, and they need to roll higher than the turn number to proceed. So they need to roll a two or more on turn 1, three or more on turn 2, and so on, and if they get past all six trials then they win the game and become a hero. What is the probability of winning the game.
0.0672 or ~6.7%
Pause game
Time.timeScale = 0f;
If main menu is unable to access another scene, what might be the problem?
They are not in build settings.
How would you retrieve an int value of "score" from PlayerPrefs?
PlayerPrefs.GetInt("score", 0)
Animator
Windows > Animation > Animator
Given 2 fair coin flips, what is the probability that of two heads or two tails?
50%
Button to move to main menu scene would have.
an OnClick option that uses a function to LoadScene
What does this return on the 2nd Scene?
SceneManager. GetActiveScene(). buildIndex
What does the 0 in this method do?
PlayerPrefs.GetInt("score", 0);
default value of "score" if none is available.
Animation
Windows > Animation > Animation
CTRL + 6
A d4, d6, d20 is rolled. What is the probability of the d4 being 4, d6 being 6, and d20 being above 15?
1/96
If a button on click destroys an object, what would you use to find the object.
GameObject.FindObjectsWithTag(" ");
What should you do to ensure that levels transitions properly using buildIndex?
Make sure the scenes are in order in the build settings
If you have a GameObject that holds data that you want to persist through multiple scenes, what are functions that you need to accomplish this?
DontDestroyOnLoad() and Instance = this;
TilePalette
Window > 2D> Tile Palette