Quiz: Unity Scripting
Test your knowledge of how scripting is done in the Unity game engine.
We'll cover the following...
Multiple Choice Questions
1
(Select all that apply.) The image below represents the “Inspector” view of MagicScript
.
Which could be the content of MagicScript
?
A)
using UnityEngine;
public class MagicScript : MonoBehaviour
{
public Vector3 MagicIntensity;
public GameObject[] MagicList;
public bool MagicOn;
}
B)
using UnityEngine;
public class MagicScript : MonoBehaviour
{
private bool MagicOn;
private GameObject[] MagicList;
private Vector3 MagicIntensity;
}
C)
using UnityEngine;
public class MagicScript : MonoBehaviour
{
[SerializeField]
private bool MagicOn;
public GameObject[] MagicList;
public Vector3 MagicIntensity;
}
D)
using UnityEngine;
public class MagicScript : MonoBehaviour
{
[SerializeField]
private Vector3 MagicIntensity;
[SerializeField]
private GameObject[] MagicList;
[SerializeField]
private bool MagicOn;
}
E)
using UnityEngine;
public class MagicScript : MonoBehaviour
{
public bool MagicOn;
public GameObject[] MagicList;
public Vector3 MagicIntensity;
}
F)
using UnityEngine;
public class MagicScript : MonoBehaviour
{
[SerializeField]
private bool MagicOn;
private GameObject[] MagicList;
private Vector3 MagicIntensity;
}
Question 1 of 30 attempted
...