wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

C# - Unity Quiz

Total questions: 13

Worksheet time: 13mins

Name
Class
Date
1.

If you want to apply Gravity what component would you want to add to a gameobject?

a)

RigidBody(2d or 3d)

b)

Image

c)

A Custom Script

d)

Box Collider

2.

What is the section called where all your GameObjects are housed?

a)

Game

b)

Inspector

c)

Hierarchy

d)

Console

3.

In code what line of code would you use to access a component on the Gameobject the script is attached to?

a)

accessComponent(component)

b)

getcomponent(component)

c)

findComponent(component)

4.

On UI what is the component called that houses the UI?

a)

Container

b)

UI Holder

c)

Canvas

5.

What is the output of this code?

x=56;

//x=2;

x+=9;

print(x)

a)

Error

b)

65

c)

66

d)

11

6.

To add a particle effect how would you instantiate the effect?

a)

Instantiate a prefab of the object by calling Instantiate(obj, place, rotation)

b)

Check the instantiate effect button.

c)

Call the summon function and summon the particle effect by typing Summon(obj)

d)

Leave the effect in the scene and it will instantiate itself

7.

How would you declare a function that has no return and is public?

a)

function MyFunction()

b)

public void MyFunction()

c)

public MyFunction()

d)

MyFunction:

8.

How would you check for a key input from the player (Old Input System)?

a)

Adding the on key down component to an object

b)

Using the if key down function

c)

Using an if statement inside an update function

9.

How would you call a function?

a)

MyFunction()

b)

Call(MyFunction)

c)

StartCourotine(

MyFunction)

10.

How many times do YOU call the start function?

a)

1

b)

Never

c)

3

d)

However many times I want

11.

How do you create and define a variable of type string?

a)

str myVariable = Hello World

b)

str myVariable = "Hello World"

c)

string myVariable = "Hello World"

d)

string myVariable = Hello World

12.

How many times is the UPDATE function called?

a)

Once every frame

b)

Whenever I call it in code

c)

Once every second

d)

Twice a frame

13.

What is the correct way to delay code?

a)

Calling an IEnumerator function

b)

Typing delay(x)

c)

delayCode(x)