---
title: "퀴즈 2"
content_type: quiz
url: "https://learn.unity.com/quiz/kwijeu-2?language=ko"
language: ko
difficulty: beginner
duration_minutes: 15
question_count: 10
correct_answers_to_pass: 1
unity_version:
  - "2021.3"
supported_unity_versions:
  - name: "2021.3"
    url: "https://learn.unity.com/quiz/kwijeu-2.md?language=ko&version=2021.3"
available_languages:
  - name: "en"
    url: "https://learn.unity.com/quiz/quiz-2-z8.md?language=en"
  - name: "es"
    url: "https://learn.unity.com/quiz/prueba-2.md?language=es"
  - name: "ja"
    url: "https://learn.unity.com/quiz/quiz-2-z8-jp.md?language=ja"
  - name: "ko"
    url: "https://learn.unity.com/quiz/kwijeu-2.md?language=ko"
last_updated: "2026-08-04T14:25:12.000Z"
---

# 퀴즈 2

이 퀴즈에서는 2단원에서 배운 기술과 개념에 대한 이해도를 확인합니다.

이 퀴즈에서는 2단원에서 학습한 기술 및 개념에 대한 지식을 평가합니다.

## Question 1

콘솔에 "Hello there!"라는 메시지가 표시되는 경우 이 메시지를 생성하는 데 사용된 코드는 무엇일까요?

_Select only one_

- Debug("Hello there!");
- Debug.Log("Hello there!");
- Debug.Console("Hello there!");
- Debug.Log(Hello there!);

## Question 2

체력이 0이 될 때 오브젝트를 파괴하려는 경우 어떤 코드가 아래의 공란에 가장 적합할까요?

![](https://connect-mediagw.unity.com/h1/20190812/learn/images/9f2eb5cb-1d85-4896-9fc0-d33d06cc5a68_Quiz_2.2.png)

_Select only one_

- health > 0
- health.0
- health \< 1
- health \< 0

## Question 3

아래의 코드로 인해 "error CS1503: Argument 1: cannot convert from 'UnityEngine.GameObject\[\]' to 'UnityEngine.Object'"라는 오류가 발생합니다.  어떻게 하면 이러한 오류를 제거할 수 있을까요?

![](https://connect-mediagw.unity.com/h1/20190812/learn/images/0e1fa5ca-8706-45a1-82a3-16715686a5d8_Quiz_2.3.png)

_Select only one_

- A. 라인 1에서 "public"를 "private"로 변경
- B. 라인 1에서 "enemyPrefabs"를 "enemyPrefabs\[0\]"으로 변경
- C. 라인 3에서 "Start()"를 "Update()"로 변경
- D. 라인 5에서 "enemyPrefabs"를 "enemyPrefabs\[0\]"으로 변경
- A 또는 D
- A와 D 모두
- B와 C 모두

## Question 4

다음 중 코드를 가장 잘 설명하는 주석은 무엇인가요?

![](https://connect-mediagw.unity.com/h1/20190812/learn/images/f5bc137b-916b-4b25-9e87-1f6c9c301c9c_Quiz_2.4.png)

_Select only one_

- // 플레이어가 다른 오브젝트와 충돌하는 경우 플레이어 파괴
- // 적이 다른 오브젝트와 충돌하는 경우 해당 오브젝트 파괴
- // 플레이어가 트리거와 충돌하는 경우 트리거 파괴
- // 플레이어가 다른 오브젝트와 충돌하는 경우 해당 오브젝트 파괴

## Question 5

플레이어가 위쪽 화살표를 누르는 만큼 계속 캐릭터를 위로 이동시키려는 경우 아래의 두 공란에 가장 적합한 코드를 고르세요.

![](https://connect-mediagw.unity.com/h1/20190812/learn/images/06f319d1-25dd-4042-b61c-1a057ded1975_Quiz_2.5.png)

_Select only one_

- GetKey(KeyCode.UpArrow)
- GetKeyDown(UpArrow)
- GetKeyUp(KeyCode.Up)
- GetKeyHeld(Vector3.Up)

## Question 6

아래의 Unity 스크립팅 API 기술 자료와 코드를 읽어 보세요. 다음 중 randomFloat 및 randomInt 변수로 가능한 값은 무엇인가요?

![](https://connect-mediagw.unity.com/h1/20200813/learn/images/41be0016-1cf7-4071-806b-0eca6f1e1533_Screen_Shot_2020_08_13_at_10.52.45_AM.png)

\-----

![](https://connect-mediagw.unity.com/h1/20200813/learn/images/1001050b-861e-4f57-a14a-6c762f34c5d5_Screen_Shot_2020_08_13_at_10.52.37_AM.png)

\-----

![](https://connect-mediagw.unity.com/h1/20210624/learn/images/575d4b79-7a66-4252-996c-a80153b3a793_image.png)

_Select only one_

- randomFloat = 100.0f; randomInt = 0;
- randomFloat = 100.0f; randomInt = 100;
- randomFloat = 50.5f; randomInt = 100;
- randomFloat = 0.0f; randomInt = 50.5;

## Question 7

배열에서 오브젝트를 무작위로 생성하려고 합니다. 하지만 게임을 실행했더니 콘솔에 "error at Assets/Scripts/SpawnManager.cs:5. IndexOutOfRangeException: Index was outside the bounds of the array."라는 메시지가 표시되었습니다. 이 문제를 해결하고 무작위 오브젝트 기능도 유지하려면 어떤 코드 라인을 편집해야 할까요?

![](https://connect-mediagw.unity.com/h1/20190812/learn/images/417ba945-d30a-4981-b040-fdb45e8c6bb9_Quiz_2.7.png)

_Select only one_

- 라인 2
- 라인 3
- 라인 4
- 라인 5

## Question 8

씬에서 프리팹을 변경했고 이러한 변경 사항을 모든 프리팹에 적용하려면 무엇을 클릭해야 할까요?

![](https://connect-mediagw.unity.com/h1/20221114/learn/images/8afce5b6-f65a-4de8-9070-0358e4b9f47d_quiz2.png)

_Select only one_

- 계층 구조 상단의 "Create" 또는  "+" 드롭다운
- 인스펙터 상단의 "Open" 버튼
- 인스펙터 상단의 "Overrides" 드롭다운
- 인스펙터 하단의 "Add Component" 버튼

## Question 9

아래의 Unity 스크립팅 API 기술 자료를 읽어 보세요. 다음 중 InvokeRepeating 메서드를 올바르게 사용한 것은 무엇인가요?

![](https://connect-mediagw.unity.com/h1/20190812/learn/images/048d8def-1a80-4456-861b-9d45fb75d0c8_Quiz_2.9.png)

_Select only one_

- InvokeRepeating("Spawn, 0.5f, 1.0f");
- InvokeRepeating("Spawn", 0.5f, 1.0f);
- InvokeRepeating("Spawn", gameObject, 1.0f);
- InvokeRepeating(0.5f, 1.0f, "Spawn");

## Question 10

사용자가 너무 느리게 가면 속도를 높이고 너무 빠르게 가면 속도를 낮추라고 지시하는 로직을 구현하려고 합니다. 그렇게 하려면 아래의 코드 라인을 어떻게 배열해야 할까요?

![](https://connect-mediagw.unity.com/h1/20190812/learn/images/cb324e4f-e0e6-4244-b4f2-fce84b8aa12c_Quiz_2.10.png)

_Select only one_

- 4, 6, 1, 2, 5, 9, 7, 8, 3

  ```csharp
  void Update() 
  {
  if (speed < 10) {Debug.Log(speedUp); }
  else if (speed > 60) {
  Debug.Log(slowDown); }
  }
  private float speed;
  private string slowDown = "Slow down!";
  private string speedUp = "Speed up!";
  ```
- 6, 1, 2, 5, 7, 8, 3, 4, 9

  ```csharp
  if (speed < 10) {
  Debug.Log(speedUp); }
  else if (speed > 60) {
  Debug.Log(slowDown); }
  private float speed;
  private string slowDown = "Slow down!";
  private string speedUp = "Speed up!";
  void Update() {
  }
  ```
- 7, 8, 3, 4, 6, 5, 2, 1, 9

  ```csharp
  private float speed;
  private string slowDown = "Slow down!";
  private string speedUp = "Speed up!";
  void Update() {
  if (speed < 10) {
  Debug.Log(slowDown); }
  else if (speed > 60) {
  Debug.Log(speedUp); }
  }
  ```
- 7, 8, 3, 4, 6, 1, 2, 5, 9

  ```csharp
  private float speed;
  private string slowDown = "Slow down!";
  private string speedUp = "Speed up!";
  void Update() {
  if (speed < 10) {
  Debug.Log(speedUp); }
  else if (speed > 60) {
  Debug.Log(slowDown); }
  }
  ```
