What keyword do we use to create a constrained slider in our inspector for one of our serialized
variables? - ANS [Range]
Why would you use Time.timeScale? - ANS We can create slow motion bullet time, just like in
the Matrix
Which of the following statements is written correctly? - ANS sceneLoader =
FindObjectOfTpe<SceneLoader>();
Which of the following statements will decrease the value of the "health" variable bi 1? - ANS
Any can work
The decrement operator is indicated by the symbol - ANS --
Audio Clips contains the audio data used by Audio Sources - ANS True
The Audio Source plays back an Audio Clip in the scene - ANS True
Audio Listener contains the audio data used by Audio Sources - ANS False
Typically your Audio Listener is located on the Canvas - ANS False
Which of the following will allow us to access the Audio Component on a specific Game Object?
- ANS GetComponent<AudioSource>()
Which of the following lines correctly declares an array variable named "ballSounds" that is of
type "AudioClip"? - ANS AudioClip[ ] ballSounds;
The increment operator is indicated by the ____ symbol. - ANS ++
Given a Text variable named "scoreText", which of the following lines of code will successfully
output the currentScore variable ToString()? - ANS scoreText.text = currentScore.ToString();
What values can you always read to find the screen width and height, in pixels? - ANS
Screen.width and Screen.height
Mathf.Clamp clamps the given value between the given minimum float and maximum float
values. (Check the Unity Documentation) - ANS True
, Which of the following statements will accurately limit our bounce velocity from a minimum of 1
to a maximum of 10? - ANS bounceHeight = Mathf.Clamp(yVelocity, 1, 10);
We can choose which scripts execute first by editing the Script Execution Order. - ANS True
What code would we write to access the Rigidbody2D component of our game object and give it
a shove up and to the left? - ANS GetComponent<Rigidbody2D>().velocity = new
Vector2(-3f,10f);
What are the possible values you can store in the C# "bool" data type? - ANS true or false
Where can we change the gravity for our entire project? - ANS Physics 2D Settings
Which of the following functions can Unity call in response to a regular, physics-based collision
event? - ANS OnCollisionEnter2D()
Using his/your code, which phrase represents the parameter (data) that is passed into the
function? - ANS Collision2D collision
Which of the following would we use to remove an object from our hierarchy when we no longer
want it to exist in our scene? - ANS Destroy(gameObject);
Which of the following lines of code will remove the object stored in the doomedObj reference
variable from the game? - ANS Destroy(doomedObject);
Which phrase would you add to the parameter name in a collision event function to get the
name of the other object? - ANS .gameObject.name
What Unity element would best be used to help you easily create many copies of the same
object? - ANS prefab
Unity's Prefab system allows you to create, configure, and store a GameObject complete with all
its components, property values, and child GameObjects as a reusable Asset. - ANS True
Which syntax is correct for printing the words "Welcome to the jungle" to the console? - ANS
Debug.Log("Welcome to the jungle");
What are the possible values you can store in the C# "bool" data type? - ANS true or false
What symbols does C# use to start a short, one-line comment? - ANS //
What characters are used to mark the start and end of a block of C# code such as a class or
function? - ANS { and }
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller LEWIS12. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $9.99. You're not tied to anything after your purchase.