小テスト:Create with Code 1

Quiz

Beginner

+180 XP

20m

Unity Technologies

小テスト:Create with Code 1 thumbnail

この小テストでは、「Create with Code 1 Mission」で取り上げられたコンセプトの理解度を評価します。

Languages available:

Question 1

以下のコードを実行すると、どのような結果になるでしょうか?

public class Enemy : MonoBehaviour
{
    public Transform ground;

    void Update()
    {
        if (transform.position.y < ground.position.y)
        {
            Destroy(gameObject);
        }
    }
}

Select only one

Question 2

以下のコメントを置き換えるには、どのようなコード行が適切でしょうか?

public float[] values = values[5];

void Start()
{
 // assign the first element in the array the value of 5.0
}

Select only one

Question 3

以下のコードの中で、最も適切なコメントはどれですか?

public class Player : MonoBehaviour
{
  // Comment
  private void OnTriggerEnter(Collider other) {
    if(other.CompareTag("Spike")) {
      Destroy(other.gameObject);
    }
  }
}

Select only one

Question 4

下の画像は、どのスクリプト編集ツール(または IDE)を使用するかを変更するための環境設定ウィンドウです。代替のコード編集ツールを選択するには、どこをクリックしますか?

Select only one

Question 5

Visual Studio では「5.0f;」に下線が引かれ、赤い四角い線が表示されます。エラーの上にマウスを乗せると、どのようなメッセージが表示されると思いますか?

int health = 5.0f;

Select only one

Question 6

以下のオートコンプリートポップアップウィンドウに表示される情報を使用して、次のうちどれが Instantiate メソッドの有効な呼び出しになりますか ?

Select only one

Question 7

以下のようなデバッグメッセージを表示させるために必要なコードは何でしょうか?

Hello world.

Select only one

Question 8

Unity Monobehavior クラスの Start() 関数と Update() 関数のどちらかについて、次のうち正しいものはどれですか?

Select only one

Question 9

このスクリプトの各パーツはどのような順序で表示されるのでしょうか?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController : MonoBehaviour
{
 public float speed;
 public string playerName;

 void Start()
    {
        playerName = "Test";
    }

 void Update()
    {
        speed++;
    }

}

Select only one

Question 10

次のコード行のうち、Unity の標準的な命名規則を使っているものはどれですか?

  1. Public Float Speed = 40.0f;
  2. Public float Speed = 40.0f;
  3. public float Speed = 40.0f;
  4. public float speed = 40.0f;

Select only one

Question 11

下のインスペクターに「Speed」と「Player Name」の変数が表示されている場合、PlayerController.cs に表示されるコードの行はどれでしょうか?

Select only one

Submit answers

To calculate your score, submit your answers to the quiz. A passing score will mark this quiz complete.

Correct answers needed to pass

9/11

Retake allowed after

0 Mins