5 ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate Attempt review

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

ชุดฝึ กฝนเพือ

� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Dashboard / My courses / depa-unity / General / ชุดฝึ กฝนเพือ


� เตรียมความพร ้อมในการสอบ Unity Certificate

Started on Friday, 8 October 2021, 12:33 AM


State Finished
Completed on Friday, 8 October 2021, 12:47 AM
Time taken 14 mins 27 secs
Grade 40.00 out of 40.00 (100%)

Question 1
Select the comment that would accurately describe what the line of code below is doing:
Complete
if (i % 2 ==0){
Mark 1.00 out of
1.00

Select one:
a. //check the i integer variable is divisible by 2 with the remainder 0 

b. //check if the i integer variable has any 0's in it 

c. //check if 2% of the i integer variable is equal to 0

d. //check for the percentage of numbers in the i integer variable 


that are the number 2  

1 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 2
Select whether code snippet follows standard Unity naming conventions by choosing True or False.
Complete
public class MyScript : MonoBehavior{
Mark 1.00 out of
1.00 public Light theLight;
private Light secondLight;

Select one:
a. True

b. False

Question 3
Select whether code snippet is using ECS by selecting True or False.
Complete
     using Unity.Jobs;
Mark 1.00 out of
1.00      using Unity.Burst;
     using Unity.Mathematics;

     using UnityEngine;

     public class EntityData : MonoBehaviour {

Select one:
True

False

2 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 4
Choose True for code snippet that is using Unity Naming Conventions and False for those that are not using unity
Complete
naming conventions
Mark 1.00 out of
1.00 public class PlayerScript : MonoBehaviour  {
      public Light playerLight;

      void PlayerFunction ()  {


          playerLight.enabled = !playerLight.enabled;
      }
}

Select one:
True

False

3 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 5
Choose True for code snippet that is using Unity Naming Conventions and False for those that are not using unity
Complete
naming conventions
Mark 1.00 out of
1.00 public class playerScript : Monobehaviour  {
      public light playerLight;

      void playerfunction ()  {


          playerlight.Enabled = !playerlight.Enabled;
      }
}

Select one:
True

False

4 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 6
Evaluate if the code snippet are using ECS libraries. Choose True for code snippet that is using ECS and False for
Complete
code snippet that is not using ECS
Mark 1.00 out of
1.00 using UnityEngine;
using System.Collections;

public class Fireball : MonoBehaviour


{

      public Rigidbody fireballPrefab;


      public Transform firePosition;

      public float fireballSpeed;

Select one:
True

False

5 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 7
Which function will continue to be called as long as it is colliding with any other collider?
Complete
Complete the script below by selecting the correct options.
Mark 1.00 out of
1.00

6 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Select one:
a. OnCollisionStay

b. OnCollisionExit 

c. OnCollisionEnter

d. OnCollision

Question 8
The move tool can be configured to display either the local or the global orientation of an object.
Complete
This statement about positioning objects in the scene view is True or False
Mark 1.00 out of
1.00

Select one:
True

False

7 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 9 Given the reference type Animator, use the drop-down lists to set the animator's Boolean parameters to Attacking
Complete and to False.
Mark 1.00 out of
Complete the code by Drag and Drop select the correct option in the lists.
1.00
Answer Area

Animator animator;
void OnTriggerEnter2D(Collider2D collider)

{
GameObject obj = collider.gameObject;

if(obj.GetComponent<player>())

animator
  .SetBool  ("Attacking" , False);
 

(Attacking , False);

Animator (Attacking ,"False");

8 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 10
Mark statement about the commented C# code in Unity as True or False
Complete
int iq = 145;
Mark 1.00 out of
1.00 // If IQ is greater than or equal to 140 a person is considered a genius.
if (iq >= 140)

Console.WriteLine("Genius");
else

Console.WriteLine("Not Genius");
The comments used were formatted correctly and accurately reflect what the code is doing

Select one:
a. True

b. False

Question 11 Analyze statement about the Game View screen when in Play Mode in the Unity editor.  Select if statement is True
Complete or False.
Mark 1.00 out of
The camera perspective of your game can be seen in the Game View window.
1.00

Select one:
a. False

b. True

9 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 12
In this window, you can access and manage the assets that belong to your project.
Complete

Mark 1.00 out of


1.00
Select one:
a. The Scene Window

b. The Hierarchy Window

c. The Project Window

d. The Inspector Window  

10 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 13 Use the lines of code to correctly display the text to the User Interface.
Complete
Select the correct code snippets and place them in target areas to complete the code.
Mark 1.00 out of
1.00 Answer Area
using System.Collections;

using System.Collections.Generic;
using UnityEngine;

 
using UnityEngine.UI;
public class ScoreManager : MonoBehaviour {

public int score = 0;

 
public Text myText;
public void Score (int points)  {

Debug.Log ("Scored points");

score += points;

 
myText.text = ("Score: " + score.ToString ());
}

using UnityEngine.Text;

11 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 14 You are adding comments to your code.


Complete
if  (Input.GetButtonDown("Fire")){
Mark 1.00 out of
1.00 Rigidbody clone;

clone = Instantiate(projectile, transform.position, transform.rotation);

clone.velocity = transform.TransformDirection(Vector3.forward * 10);


}

Select the two comments that accurately describes what the code is doing (Choose 2)

Select one or more:


a. //Instantiate a clone at the position. Have it fire on enemies  

b. //Give the cloned object an initial velocity along the current object's Z axis 

c. //Instantiate the projectile at the position and rotation of this transform  

d. //Destroy original object and replace with clone  

12 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 15
You can add transitions from the Entry node to other states to control which state the state machine should begin
Complete
in.
Mark 1.00 out of
1.00 This statement about state machine transitions in Unity is True or False

Select one:
True

False

13 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 16
Select whether code snippet is using ECS by selecting True or False.
Complete
using UnityEngine;
Mark 1.00 out of
1.00 using System.Collections;

public class KeyboardScript : MonoBehaviour


{
      public class Wizard
      {
           public int fireballs;
           public int shields;
           public int missiles;
      }
}

Select one:
True

False

14 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 17
This window is your interactive view into the world you are creating.
Complete

Mark 1.00 out of


1.00
Select one:
a. The Project Window

b. The Inspector Window  

c. The Hierarchy Window

d. The Scene Window

Question 18
The tag property can be used to enable multiple objects to be found at once using a MonoBehaviour script.
Complete
This statement about the inspector window is True or False
Mark 1.00 out of
1.00

Select one:
True

False

15 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 19 Match the console messages to their corresponding Debug.Log statement.


Complete
Answer Area
Mark 1.00 out of
1.00 Debug.Log("Local Position: " + gameObject.Transform.localPosition);  
Local Position: (0,150,26)
Debug.Log("Local Rotation: " + gameObject.Transform.localRotation);  

Debug.Log("Color: " + image.Color);  


Local Rotation: (0,1,‑1,0)
Debug.Log(gameObject.Name);  
Color: (0.54, 0.634, 0.19, 1)

GameObject

Question 20
Which statement will log the message "Hello World!“ to the console window?
Complete

Mark 1.00 out of


1.00
Select one:
a. Debug.Log = "Hello World!"; 

b. Debug.Log ("Hello World!");  

c. Debug.Log "Hello World!"; 

d. Console.Log ("Hello World!"); 

16 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 21 You have a shader with the following properties.  Set the shader's color to Color.red.
Complete
Properties {
Mark 1.00 out of
1.00 [PerRendererData]_MainTex ("MainTex", 2D) = "white" {}
_Color ("Color", Color) = (0,0,0,0)

material.SetColor(   ,   );
"_Color" Color.red
_Color

Color Red

New Color(red)

17 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 22
Evaluate if the code snippet are using ECS libraries. Choose True for code snippet that is using ECS and False for
Complete
code snippet that is not using ECS
Mark 1.00 out of
1.00 using Unity.Entities;
using UnityEngine;

public class EnemyMovementSystem : ComponentSystem


     {

     public Rigidbody Rigidbody;


     public InputComponent Inputcomponent;

     }

Select one:
True

False

18 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 23
Given the incomplete if statements, use the correct Input Method to make the statements log the correct message
Complete
to the console.  Drag and Drop select the correct option in the lists.
Mark 1.00 out of
1.00 Note:  Each correct answer is worth partial credit.
void Update()

if(Input.  
GetKey(KeyCode.LeftArrow))
{   

Debug.Log("Left Arrow key is being held down");

if(Input.  
GetKeyDown(KeyCode.UpArrow))
{

Debug.Log("Up Arrow key was pressed once");

if(Input.  
GetKeyUp(KeyCode.DownArrow))
{

Debug.Log("Down Arrow key was released");

19 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 24
Evaluate if the code snippet are using ECS libraries. Choose True for code snippet that is using ECS and False for
Complete
code snippet that is not using ECS
Mark 1.00 out of
1.00 using Unity.Entities;
using UnityEngine;

public class ShieldComponent : MonoBehavior


      {

      public float Protection;


      public float Size;

      }

Select one:
True

False

Question 25
State machines can be created with or without a default state.
Complete
This statement about state machine transitions in Unity is True or False
Mark 1.00 out of
1.00

Select one:
True

False

20 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 26 Mark statement about the commented C# code in Unity as True or False
Complete
int iq = 145;
Mark 1.00 out of
1.00 // If IQ is greater than or equal to 140 a person is considered a genius.
if (iq >= 140)

Console.WriteLine("Genius");
else

Console.WriteLine("Not Genius");
The comment incorrectly capitolizes IQ which will stop the code from running due to the int iq being written with
lower case letters

Select one:
a. True

b. False

Question 27
Your code is causing the error NullreferenceException: Object reference not set to an instance of an object.
Complete
Which line of code is causing the error?
Mark 1.00 out of
1.00

Select one:
a. GameObject projectile;

b. bool hasLanded;

c. float Xmax;

d. int score;

21 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 28 Drag and drop each operator to its description.


Complete
not equal to !=
 
Mark 1.00 out of
1.00  
increment ++

 
equal to ==

string concatenation + 

assignment = 

Question 29
This window displays detailed information about the currently selected GameObject, including all attached
Complete
components and their properties, and allows you to modify the functionality of GameObjects in your Scene.
Mark 1.00 out of
1.00

Select one:
a. The Inspector Window

b. The Hierarchy Window

c. The Scene Window

d. The Project Window

22 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 30
You've been asked to create a script for an object that gives off an explosive force when initially touched by
Complete
another object.
Mark 1.00 out of
1.00 Complete the code by selecting the correct option

Select one:
a. void OnTriggerExit()

b. void OnStay()

c. void OnCollisionExit()

d. void OnTriggerEnter()

23 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 31 When using Input.GetButton, the player will fire a projectile continuously when it is held down.
Complete
Select whether statement regarding input Methods is True or False
Mark 1.00 out of
1.00
Select one:
a. False

b. True

24 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 32 You have been asked to create a function (only available in this script) that will turn on or turn off a game object. 
Complete This game object is controlled by mouse clicks on a different 3D object in the scene.
Mark 1.00 out of
Select the correct code snippets and place them in the correct area of the provided code.
1.00
Answer Area

public class TurnOnDisplay : MonoBehaviour


{

public GameObject displayPane;


private void Start()

displayPane.SetActive(false);
}

         

{
Private void OnMouseUp()
if (displayPane.activeInHierarchy == false)

displayPane.SetActive(true);
}

else

displayPane.SetActive(false);

}
}

25 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 33
Select whether a statement is True or False
Complete
The void keyword indicates that a function will return a null value.
Mark 1.00 out of
1.00
Select one:
True

False

26 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 34 To answer this question, use the AddForceAPI that accepts a Vector value and a numerical value.
Complete
You need to apply a force value to a RigidBody that is attached to a GameObject.  The force must move the object
Mark 1.00 out of
in the direction it is facing.  You must use a force value that can be set in the inspector.
1.00
Complete the code by Drag and Drop select the correct option in the lists.

Answer Area
public class MovingThings : MonoBehavior

{
private float speedOfMotion;

public float speedForce;

private static float forceSpeed = 10f;


private Rigidbody rigidBody;

void Start()

speedOfMotion = 10f;

rigidBody = gameObject.Getcomponent<Rigidbody>();

void FixedUpdate()
{

rigidBody.AddForce(   *   )

}
transform.forward speedForce

Vector2.facing

speedOfMotion forceSpeed

27 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 35 Select whether code snippet follows standard Unity naming conventions by choosing True or False.
Complete
Public Class Myscript : Monobehavior{
Mark 1.00 out of
1.00 Public Light Thelight;
Private Light Secondlight;

Select one:
a. False

b. True

Question 36 A new External Script Editor will be used and needs to be connected to unity's editor. Please select the correct
Complete answer
Mark 1.00 out of
1.00 Select one:
a. External Script Editor can be selected in the Unity Preferences window.

b. External Script Editor can be selected via import packages

c. External Script Editor can be selected in the Build Settings window

d. External Script Editor can only be selected when creating a new project.

28 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 37 Given the following code example, determine what is the appropriate datatype 
Complete
to declare the variable rb in order to avoid a "Cannot implicitly convert type" error. Complete the script below by
Mark 1.00 out of
selecting the correct options.
1.00

Select one:
a. CharacterController)

b. Collider 

c. Rigidbody

d. Vector3

29 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 38 Analyze statement about the Game View screen when in Play Mode in the Unity editor.  Select if statement is True
Complete or False.
Mark 1.00 out of
It is possible to change the aspect ratio of your game to see how it will look on different device screens.
1.00

Select one:
a. True

b. False

Question 39
This window contains a list of every GameObject in the current Scene.
Complete

Mark 1.00 out of


1.00
Select one:
a. The Inspector Window

b. The Scene Window

c. The Hierarchy Window

d. The Project Window

30 of 31 10/8/2021, 12:51 AM
ชุดฝึ กฝนเพือ
� เตรียมความพร ้อมในการสอบ Unity Certificate: Attempt review https://arit.co.th/lms/mod/quiz/review.php?attempt=5146&cmid=43

Question 40
Vertex snapping is used to snap a vertex of a selected mesh to the scene grid
Complete
This statement about positioning objects in the scene view is True or False
Mark 1.00 out of
1.00

Select one:
True

False

31 of 31 10/8/2021, 12:51 AM

You might also like