Quiz
•
Beginner
+60 XP
15m
2
Unity Technologies
이 퀴즈에서는 2단원에서 학습한 기술 및 개념에 대한 지식을 평가합니다.
Languages available:
콘솔에 "Hello there!"라는 메시지가 표시되는 경우 이 메시지를 생성하는 데 사용된 코드는 무엇일까요?
Select only one
Debug("Hello there!");
Debug.Log("Hello there!");
Debug.Console("Hello there!");
Debug.Log(Hello there!);
체력이 0이 될 때 오브젝트를 파괴하려는 경우 어떤 코드가 아래의 공란에 가장 적합할까요?
health > 0
health.0
health < 1
health < 0
아래의 코드로 인해 "error CS1503: Argument 1: cannot convert from 'UnityEngine.GameObject[]' to 'UnityEngine.Object'"라는 오류가 발생합니다. 어떻게 하면 이러한 오류를 제거할 수 있을까요?
A. 라인 1에서 "public"를 "private"로 변경
B. 라인 1에서 "enemyPrefabs"를 "enemyPrefabs[0]"으로 변경
C. 라인 3에서 "Start()"를 "Update()"로 변경
D. 라인 5에서 "enemyPrefabs"를 "enemyPrefabs[0]"으로 변경
A 또는 D
A와 D 모두
B와 C 모두
다음 중 코드를 가장 잘 설명하는 주석은 무엇인가요?
// 플레이어가 다른 오브젝트와 충돌하는 경우 플레이어 파괴
// 적이 다른 오브젝트와 충돌하는 경우 해당 오브젝트 파괴
// 플레이어가 트리거와 충돌하는 경우 트리거 파괴
// 플레이어가 다른 오브젝트와 충돌하는 경우 해당 오브젝트 파괴
플레이어가 위쪽 화살표를 누르는 만큼 계속 캐릭터를 위로 이동시키려는 경우 아래의 두 공란에 가장 적합한 코드를 고르세요.
GetKey(KeyCode.UpArrow)
GetKeyDown(UpArrow)
GetKeyUp(KeyCode.Up)
GetKeyHeld(Vector3.Up)
아래의 Unity 스크립팅 API 기술 자료와 코드를 읽어 보세요. 다음 중 randomFloat 및 randomInt 변수로 가능한 값은 무엇인가요?
-----
randomFloat = 100.0f; randomInt = 0;
randomFloat = 100.0f; randomInt = 100;
randomFloat = 50.5f; randomInt = 100;
randomFloat = 0.0f; randomInt = 50.5;
배열에서 오브젝트를 무작위로 생성하려고 합니다. 하지만 게임을 실행했더니 콘솔에 "error at Assets/Scripts/SpawnManager.cs:5. IndexOutOfRangeException: Index was outside the bounds of the array."라는 메시지가 표시되었습니다. 이 문제를 해결하고 무작위 오브젝트 기능도 유지하려면 어떤 코드 라인을 편집해야 할까요?
라인 2
라인 3
라인 4
라인 5
씬에서 프리팹을 변경했고 이러한 변경 사항을 모든 프리팹에 적용하려면 무엇을 클릭해야 할까요?
계층 구조 상단의 "Create" 또는 "+" 드롭다운
인스펙터 상단의 "Open" 버튼
인스펙터 상단의 "Overrides" 드롭다운
인스펙터 하단의 "Add Component" 버튼
아래의 Unity 스크립팅 API 기술 자료를 읽어 보세요. 다음 중 InvokeRepeating 메서드를 올바르게 사용한 것은 무엇인가요?
InvokeRepeating("Spawn, 0.5f, 1.0f");
InvokeRepeating("Spawn", 0.5f, 1.0f);
InvokeRepeating("Spawn", gameObject, 1.0f);
InvokeRepeating(0.5f, 1.0f, "Spawn");
사용자가 너무 느리게 가면 속도를 높이고 너무 빠르게 가면 속도를 낮추라고 지시하는 로직을 구현하려고 합니다. 그렇게 하려면 아래의 코드 라인을 어떻게 배열해야 할까요?
4, 6, 1, 2, 5, 9, 7, 8, 3
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
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
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
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); } }
To calculate your score, submit your answers to the quiz. A passing score will mark this quiz complete.
Correct answers needed to pass
Retake allowed after