Unity in a nutshell

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Choose the correct information about Vector3 a. Representation of 2D and 3D object in x,y,z axis b. Representation of 3D object in x,y,z axis c. Representation of both 3D location and 3D object in x,y,z axis d. Representation of 3D location in x,y,z axis

A

Choose the correct information about the Play button (Ctrl + P) in Unity IDE a. You can use Ctrl + P to start your game. b. None of the others c. All of the others d. You can use Ctrl + P to stop your game.

A

Choose the correct information for Unity Timer class a. All of the others b. Unity Timer class that can be used to run for a specified period of time. c. The consumer of the class should be able to start the timer and determine whether or not the timer is currently running and whether or not it has finished running d. None of the others

A

Choose the correct information for sprite modes a. All of the others b. The most common use of Multiple is if we're importing a sprite strip (also called a sprite sheet) for an animation. c. None of the others d. The two possible sprite modes are Single and Multiple. Single means we're importing a single image and Multiple means multiple images are included in the png.

A

Choose the incorrect information for an object. (Câu này là cái câu bị trùng đáp án) a. An object will have state, behavior, and identity(ways to tell one thing from another).

A

Entities in a Unity scene are called A. Game Objects B. sprites C. Bob D. scripts

A

Exceptions will A. crash our program if we don't catch them B. crash the plane if they see a snake C. crash the car if they see a waterfall D. crash into the sun E. take over the world some day

A

Having game designers modify C# code is A. a bad idea B. a great idea C. no problem, coding is easy D. smart because all game designers understand programming

A

How do you create a Prefab? a. Project -> Assets -> New Folder (Call it Prefabs) -> Drag a GameObject(s) from the Hierarchy to the Folder. Then drag that Prefab into the Hierarchy/Scene to create a GameObject with the same settings. b. Project -> Assets -> New Folder (Call it Prefabs) -> Drag a GameObject(s) from the Hierarchy to the Folder. Then drag that Prefab into the Hierarchy/Scene to create a GameObject with the settings are different in some cases. c. None of the others. d. Project -> Hierarchy -> New Folder (Call it Prefabs) -> Drag a GameObject(s) from the Assets to the Folder. Then drag that Prefab into the Hierarchy/Scene to create a GameObject with the same settings.

A

How do you create a variable with the floating number 2.8? a. double x = 28D; b. int x = 28D; c. floating x = 28D; d. x = 28D;

A

IO in C# is all about A. streams B. rivers C. creeks D. babbling E. brooks

A

In C# programming language the fields, properties, and methods of a class are called the _________. a. class members b. access modifiers c. All of the others d. object members

A

Multiple inheritance is A. the root of all evil, so not supported in C# B. the root of all evil, but still supported in C# C. finally, something I don't have to learn D. the best thing ever E. the root of all evil

A

Polymorphism means objects of different classes can respond to the same method call in A. different class-specific ways B. Spain C. a daze D. confusion

A

The base keyword is like the this keyword except A. it refers to the base class B. it refers to this object C. it refers to my mother D. it refers to your father E. I'm your father

A

The most appropriate way to provide external consumer access to the behavior of an object is through A. methods B. fields C. properties D. identities

A

The most appropriate way to provide external consumer access to the state of an object is through A. properties B. fields C. methods D. identities

A

To make sure our movement is independent of frame rate when we process keyboard or gamepad input, we should A. use Time.deltaTime in the Update method for the moving game object B. put our movement code in the FixedUpdate method so we know we get called 50 times per second

A

Use transform.translate to ____________ a. move an object in x,y, or z axis b. None of the others c. All of the others d. rotates an object in the x, y, or z axis

A

We declare a method to be virtual so A. child classes can override it B. a needle pulling thread C. a note to follow sew D. no one knows it's there

A

We put the code that might throw an exception into a _______ block do or do not (there is no try) A. try B. catch C. force D. finally

A

What is OnDestroy() or MonoBehavior event functions? a. This method is called when the MonoBehavior is about to be destroyed. b. This method is sent to all GameObjects before the application quits. c. This method is called when the MonoBehaviour becomes disabled or destroyed. This is also called after scripts are reloaded after compilation. d. This method is called for rendering and handling GUI events.

A

What is a scene in Unity? a. A snapshot of a hierarchy with GameObjects, Prefabs and their components and properties. b. Stores a GameObject hierarchy complete with components and properties. c. None of the others. d. Provide an area in which to place all UI elements

A

When we declare a variable, we need to provide a __________ and a variable name A. data type B. class name C. value type D. assignment statement

A

When we say we clamp a value, we mean we A. keep the value within a specific range of values B. set the value to 0 C. set the value to an input axis

A

Which method the Unity Scripting reference tells us this method logs a message to the Unity Console a. Debug.Log method b. None of the others c. Console.WriteLine method d. Console.Write method

A

Which statement is incorrect about C# language? a. There is no pointer required in C# b. C# does support Automatic memory management through the delete keyword c. C# fully supports aspect-oriented programming techniques d. C# fully supports interface-based programming techniques

A

XML stands for A. eXtensible Markup Language B. Integrated Development Environment C. Unified Modeling Language D. International Game Developers Association

A

You need to represent 31 unique values in binary. How many bits do you need? A. 5 B. 8 C. -1 D. 4.9542

A

Inheritance (is-a relationship) is very useful when we want to A. buy and use a commercial engine B. get rich when someone dies C. use class libraries D. write engine code E. reuse our own code

A C D E

A parent class and a child class can also be called on a cell phone A. a base class and a derived class B. Mom and kid C. a fish and a sledgehammer D. a superclass and a subclass

A D

Choose the correct information about BoxCollider2D class/object is UnityEngine. a. This class makes collider for 2D physics representing an axis-aligned rectangle. b. BoxCollider2D object is a box-shaped primitive collider. c. All of the others. d. None of the others.

A.

A collection of a superclass can hold A. the Superball and Frisbee B. the superclass and all subclasses C. a liter D. 12 ounces E. the Superman and Kryptonite

B

Choose correct information about MonoBehavior. a. The base class within the namespace UnityEngine from which every Unity script derives, the MonoBehaviour reference provides you with two functions such as Start(), Update() and events that are available to standard scripts attached to Game Objects. b. The base class within the namespace UnityEngine from which every Unity script derives, the MonoBehaviour reference provides you with a list of all the functions and events that are available to standard scripts attached to Game Objects. c. The derived class within the namespace UnityEngine from which every Unity script bases, the MonoBehaviour reference provides you with a list of all the functions and events that are available to standard scripts attached to Game Objects. d. The derived class within the namespace UnityEngine from which every Unity script bases, the MonoBehaviour reference provides you with two functions such as Start(), Update() and events that are available to standard scripts attached to Game Objects.

B

Choose the correct answer about the reference types. a. None of the others. b. Reference types are called that because variables that are reference types refer to an object that's been created in memory. The data type for an object is a class (these are also called reference data types in C#) c. All of the others. d. Reference types are called that because variables that are reference types refer to an object that's been created in memory. The data type for an object is a property of a class (these are also called reference data types in C#)

B

Choose the correct information about SpriteRenderer class in UnityEngine. a. A component for masking Sprites and Particles. b. Renders a Sprite for 2D graphics. c. SpriteRenderer is a component that can be added to a state machine state for 2D graphics. d. Represents a Sprite object for use in 2D gameplay.

B

Choose the correct information about Unity. a. All of the others. b. None of the others. c. The Scene is made of GameObjects that you add Component functionality to. d. Unity uses Object-Component Model.

B

Choose the correct information about Vector2. a. None of the others. b. Vector2 is used in some places to represent 2D positions and vectors. c. Vector2 is constructed as a new vector with given x, y, z components. d. Vector2 is returned a formatted string for the vector.

B

Choose the correct statement about Hierarchy windows. a. Shows you warnings/errors and how to fix them. In the 'project' window. b. Shows all scenes, game objects, and parent/child relationships. On the far left side of the screen. c. Lists all files and directories, or, assets. At the bottom of the screen. d. Shows all data of a selected item in Project or Hierarchy view. On the far right of the screen.

B

Choose the correct statement related to the Namespaces in C#? a. The members of a namespace can be interfaces, structures, and delegates but not namespaces b. It is used to organize the classes c. All of the others d. It helps to control the scope of methods and variables in larger .Net programming projects

B

How do we add behaviors to objects in Unity? a. Attaching Scripts as Objects b. Attaching Scripts c. Attaching CIL Code d. Attaching the compiled Scripts

B

How do you assign a script to an object? a. Drag script onto game object in the project options b. Drag script onto game object in the hierarchy c. Drag script onto game object in the inspector d. Drag script onto game object in the sence

B

If we use the input manager, adding gamepad support to a game that already has keyboard support typically requires lots of code changes. A. true B. false

B

In Unity, what are the two functions that are called every frame of the game? a. Start and Update b. FixedUpdate and Update c. Non of the others d. FixedUpdate and Start

B

In Unity, what does transform consist of? a. Rotation, transform option and scale b. Position, rotation, and scale c. Position, transform option and scale d. Position, rotation, transform option and scale

B

Inheritance (is-a relationship) is not useful when we want to A. buy and use a commercial engine B. get rich when someone dies C. use class libraries D. write engine code E. reuse our own code

B

Mark most of the fields with[SerializeField] when we Write the Code so we can populate them in the Inspector. a. [SerializeClass] b. [SerializeField] c. [SerializeObject] d. [SerializeProperty]

B

Solving problems one step at a time. Choose the correct order for solving problems a. 1. Understand the Problem - 2. Design a Solution - 3. Write the Code - 4. Write Test Cases - 5. Test the Code b. 1. Understand the Problem - 2. Design a Solution - 3. Write Test Cases - 4. Write the Code - 5. Test the Code c. 1. Understand the Problem - 2. Write Test Cases - 3. Design a Solution - 4. Write the Code - 5. Test the Code d. 1. Design a Solution - 2. Understand the Problem - 3. Write Test Cases - 4. Write the Code - 5. Test the Code

B

The inverted tree of classes related through inheritance is called A. the nobility B. a class hierarchy C. why would a tree be inverted? D. what the heck does inverted mean? E. a social hierarchy

B

We can replace the standard input and/or output streams with a you know not to pick this one, right? A. wrench B. file C. screwdriver D. hammer

B

What are Colliders and what do they do? a. The Colliders define the order in which GameObjects in the same layer are drawn. Higher numbers are drawn last/are on top of the Scene. b. None of the others. c. All of the others. d. They are simple shapes that the Physics System takes as the approximate shape of the GameObject so it can do its calculations.

B

What are Packages in Unity? a. Package stores the State Machine that defines how those animations relate to each other. b. None of the others. c. A bundle of codes and assets that you can add to your Project using the Package Manager. d. The Package that store the data for the animation. e. All of the others.

B

What is Prefab in Unity? a. All of the others. b. A Prefab makes a GameObject with all its components and settings into an Asset. c. Prefab makes it easy to change settings across multiple GameObjects that are the same. d. None of the others.

B

When we call a static function, we start with the _____________ name A. field B. class C. object D. variable

B

When we process mouse button input using the input manager, we can use GetMouseButtonDown to respond to player clicks A. true B. false

B

Your interactive sandbox where you edit the game? a. Game View b. Scene View c. Project Window d. Inspector Window

B

Select the two things that a data type tells us below A. The address of a variable of that data type B. How to interpret the bits for variables of that data type C. The name of a variable of that data type D. Valid operations for variables of that data type

B D

Choose the Audio formats supported by Unity 2D in the normal cases. a. File with the extension .mp3 b. None of the others. c. All of the others. d. File with the extension .wav e. File with the extension .ogg

C

Choose the correct information about Game Object a. Game Object must be created to choose an axis and Unity tells script what buttons make objects move a certain direction b. Transform Component c. An entity in your unity scene(camera, car, obstacles, environment) d. A series of characters(numbers, letters, or symbols).

C

Choose the correct information about Prefab. a. None of the others. b. Our starting point for our solution in this section is our solution from the previous section with only the first teddy bear placed in the scene. c. All of the others. d. A template for creating as many instances of a game object, including all its properties and components. e. Walk through the process of creating and using prefabs to refactor the game from the previous section to use prefabs instead.

C

Choose the correct information about Transfrom in Unity 2D. a. None of the others. b. Every object in a Scene has a Transform. c. All of the others. d. Every Transform can have a parent, which allows you to apply position, rotation and scale hierarchically. e. Transform is used to store and manipulate the position, rotation and scale of the object.

C

Choose the correct information about data type a. Value types are the most basic data types there are in C#, and their values are stored directly into memory locations. b. The data type for a variable or constant tells us two things: What values the variable or constant can have, and What operations are valid for the variable or constant c. All of the others d. A variable of a reference type contains a reference to an instance of the type.

C

Choose the correct information about the MonoBehaviour.Start() a. Start is called every frame, if the MonoBehaviour is enabled. b. Start is called on the frame when a script is enabled just after any of the Update methods are called the first time. c. Start is called on the frame when a script is enabled just before any of the Update methods are called the first time. d. MonoBehaviour.Start() has the frequency of the physics system; it is called every fixed frame-rate frame.

C

Choose the syntax for creating an object. a. ClassName objectName = new (arguments); b. None of the others. c. ClassName objectName = new ClassName(arguments); d. ClassName objectName = new objectName.MethodName();;

C

Delegates are useful when we want to pass A. other cars B. a puck C. a reference to a method D. the buck

C

Determines the Position, Rotation, and Scale of each object in the scene(every object has a Transform) a. Inspector Component b. UnityEngine Component c. Transform Component d. Window Component

C

The PlayerPrefs class lets us store A. grain B. game configuration data C. information across game sessions D. acorns

C

To define input axes and game actions for your project you need? (Using Edit->Project Settings->Input). a. PlayerSettings b. Physics Manager c. Input Manager d. PresetManager

C

We use the __________________________ class when processing input in Unity A. InputManager B. Mouse C. Input D. Keyboard

C

We'll call the things we use to keep track of an object's state that object's __________. a. properties b. methods c. fields d. constructors

C

What does a Prefab do? a. Stores a GameObject hierarchy complete with components and properties. b. Stores all components of GameObject hierarchy complete with the properties. c. All of the others. d. None of the others.

C

What is Animator in Unity 2D? a. Responsible for creating only the skeletal animations for a game. This role often split into further specializations, such as character animator or effects animator. b. Responsible for creating only the key frame animations for a game. This role often split into further specializations, such as character animator or effects animator. c. Responsible for creating the animations for a game. This role often split into further specializations, such as character animator or effects animator. d. None of the others.

C

When importing art, what do you need to do in the Inspector window before making it a GameObject? a. None of the others. b. Unity cannot use the .png, .bmp file, it must turn it into something before you import. c. Change the texture type to "Sprite 2D & UI" d. All of the others.

C

Which data type is used to create a variable that should store text? a. str b. myString c. string d. MyString

C

An identifier is used to name something in a program. Choose the incorrect statement about identifiers. a. They can't start with a number, and they can't contain any spaces. b. Identifiers can contain any number of letters, numbers, special characters and underscores. c. Identifiers can't be keywords in programming language d. C# is case sensitive, which means that the identifier playerName is NOT the same as the identifier playername.

D

Choose the correct information about the MonoBehaviour class in UnityEngine a. MonoBehaviour class is the base class from which every Unity script derives. b. None of the others c. When you use C#, you must explicitly derive from MonoBehaviour. d. All of the others

D

Choose the correct information for calling methods(Method with No Return Value, No Parameters) a. variableName = objectName.MethodName(argument, argument, ...); b. objectName.MethodName(argument, argument, ...); c. variableName = objectName.MethodName(); d. objectName.MethodName();

D

Choose the correct statement about the method Update() of MonoBehavoir class. a. Update() method is the most commonly used function to implement any kind of game script. b. None of the others. c. Update() method of MonoBehavior class is called every frame, if the MonoBehaviour is enabled. d. All of the others. e. Not every MonoBehaviour script needs Update() method.

D

How do you create a variable with the numeric value 5? a. num = 5; b. double num = 5; c. num int = 5; d. int num = 5;

D

If we step through a collection containing objects of a superclass and its subclasses, calling a method, each object knows which method to execute based on A. it's a turf war, on a global scale B. its height C. its weight D. its class E. it's a mystery

D

If we want a field available to child classes, we make it A. grassy B. private C. public D. protected

D

In Unity, choose the correct answer about the Project window. a. None of the others b. The Project window shows a list of all the objects that are in the current scene; at this point, that's just the Main Camera object that Unity provided by default when we created the project. c. The Project window shows a list of all the properties of objects that are in the current scene. d. The Project window on the left holds all the assets (scripts, art assets, sound effects, and so on) for entire game. We can also use folders here to organize all our assets so we can keep them organized.

D

In object-oriented lingo, to create a new object (instance) from the class using ___________. a. class modifier b. constructor c. class d. instantiation

D

Is C# a compiled language or an interpreted language? a. None of the others b. C# is a interpreted language c. C# is a compiled language d. All of the others

D

One of the things that we'll find to be really useful in Unity is something called prefabs. Choose the correct information for prefabs. a. None of the others b. All of the others c. A prefab as a template for creating an instance of a game object, including all its properties and components, as we need in the scene. d. A prefab as a template for creating as many instances of a game object, including all its properties and components, as we need in the scene.

D

The code in the _______ block is always executed A. catch B. throw C. try D. finally E. eventually

D

The standard input stream is the A. dance pad B. gamepad C. brake pad D. keyboard E. mouse

D

What component do all GameObjects start with? a. Hierarchy Component. Lets you set first the position and rotation method of the GameObject in the scene. b. Sprite Component. Lets you set main the position and rotation method of the GameObject in the scene. c. None of the others. d. Transform Component. Lets you set the position and rotation of the GameObject in the scene.

D

What is Rigidbody2D in Unity? a. None of the others b. Adding a Rigidbody2D component to an object will put its motion under the control of Unity's physics engine. c. By adding the appropriate collider component, the sprite will also respond to collisions with other sprites. d. All of the others

D

What is the purpose of Vector2 in UnityEngine namespace? a. Representation of 3D vectors and points with the z value is zero. b. Representation two of four-dimensional vectors. c. Representation of 2D vectors and points using integers. d. Representation of 2D vectors and points.

D

What programming language do we use in Unity a. Python b. Java c. Kolint d. C# (C-Sharp)

D

When we override a method, we A. use our personal signature B. do it because we can, not because we should C. use a different method signature D. use the same method signature E. put a levitating saddle on it and mount up

D

Whether we're reading from or writing to a file, the final thing we should do is A. braise it B. chop it C. open it D. close it E. puree it

D

You have 4 bits you can use to give unique names (using binary!) to different inventory items in your game. How many unique names can you have? A. 8 B. 42 C. -1 D. 16

D

Abstract classes are good when we A. need a Picasso B. can't really think concretely right now C. need a sandwich D. know we need a property but don't have a general implementation E. know we need a method but don't have a general implementation

D E

Before we can read from a file, we need to A. peel it B. close it C. dice it D. slice it E. open it

E

The standard output stream is the A. consolation accessory B. mouse C. olfactory accessory D. keyboard E. console

E

We can use a dictionary to store A. our game collection B. locks we look up using a key C. keys we look up using a value D. skies we look up at E. values we look up using a key

E

We put the code that might handle a particular exception type into a _______ block A. finally B. try C. little wooden D. tackle E. catch

E

Which of the following are ways to programmatically access an active GameObject? a. None of the others. b. GameObject.FindObjectsWithTag() c. GameObject.FindWithTag() d. the variable gameObject e. GameObject.Find() f. All of the others.

F


Kaugnay na mga set ng pag-aaral

section 7 unit 1: A Brief History of Agency

View Set

Information Systems Management - C724 (Set 1)

View Set

Geometry - (Points, Lines, Planes, Rays, Segments)

View Set

HTML5 forms, usability, and accessibility

View Set

Chapter 5 GDP (Gross Domestic Production) Quiz

View Set

Final Exam Part 2 (Chapters 8 - 14)

View Set

Advanced Health Assessment Test 1

View Set

Biology exam 2 Module HW/ Pre-assessment

View Set