Search Header Logo

Understanding Unity 2D Variables and Methods

Authored by Ashley Lilly

Computers

10th Grade

Used 6+ times

Understanding Unity 2D Variables and Methods
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to declare an integer variable named score in C#?

int score;

integer score;

var score;

score int;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you call a method named `DisplayMessage` that takes a string parameter in C#?

DisplayMessage("Hello World");

DisplayMessage;

DisplayMessage[];

DisplayMessage("Hello World")

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What method is commonly used to access a component attached to a GameObject in Unity?

GetNode( )

GetComponent<>()

FindComponent()

AccessComponent()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is true about public variables in Unity?

They can only be modified in the script.

They can be assigned in the Inspector and accessed by other scripts.

They are not visible in the Inspector.

They do not exist between scenes.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods will destroy a gameObject?

OnDestroy( )

Delete( )

Enable( )

Destroy( )

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does ForceMode2D.Impulsedo when applied to a Rigidbody2D?

Applies a continuous force over time

Prevents any movement

Applies strong, quick force to create a sudden movement

Changes the mass of the Rigidbody

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does Vector2 represent in Unity?

A 3D point in space

A color value

A sound effect

A point or direction in 2D space

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?