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

10/8/21, 5:23 PM ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate: Attempt review

Dashboard / My courses /
depa-unity /
General /
ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate

Started on Friday, 8 October 2021, 5:03 PM


State Finished
Completed on Friday, 8 October 2021, 5:20 PM
Time taken 16 mins 37 secs
Grade 36.50 out of 40.00 (91%)

Question 1
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

Question 2
Select whether the code snippet is using ECS by selecting
True or False.
Complete
     using UnityEngine;
Mark 1.00 out of
1.00      using Unity.Entities;
     using Unity.Mathematics;

     public struct EntityData : IComponentData {


Select one:
True

False

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

Mark 0.00 out of


1.00
Select one:
a. The Inspector Window  

b. The Project Window

c. The Scene
Window

d. The Hierarchy
Window

https://arit.co.th/lms/mod/quiz/review.php?attempt=5221&cmid=43 1/14
10/8/21, 5:23 PM ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate: Attempt review

Question 4 The code generates the error message - Maths.SineFunction(float, float, float)':  not all code paths return a value.
Complete Complete the script by Select the correct code snippet.

Mark 1.00 out of


1.00

Select one:
a. return new P;

b. return static p;

c. return P

d. return p;

Question 5 Analyze statement about the Game View screen when in Play Mode in the Unity editor.  Select if statement is True or
Complete 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. False

b. True

Question 6
It is possible to transition from state machine to state
machine, but not from a state to a state machine.
Complete
This statement about state machine transitions in Unity
is True or False
Mark 0.00 out of
1.00

Select one:
True

False

https://arit.co.th/lms/mod/quiz/review.php?attempt=5221&cmid=43 2/14
10/8/21, 5:23 PM ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate: Attempt review

Question 7
You have been
asked to build the code listens for the up arrow and scales up the y axis of an
object continually as long as
Complete
the arrow is held down.
Mark 1.00 out of
1.00 Complete the
code by drag and drop the correct options from lists

Answer Area
                    public class ScalePlatform
: MonoBehaviour

                    {
                           public float
scaleFactor;

                           void Update()


                           {

                                  if( Input.GetKey


  (KeyCode.UpArrow))
 

                                  {

                                        IncreaseScale();
                                  }

                           }
                           private void
IncreaseScale()

                           {
                            
gameObject.transform.localScale = new Vector3(transform.localScale.x, transform.localScale.y
+ scaleFac

                           }
                   }

Input.GetKeyUp (Key.UpArrow)

Question 8 Complete the code by selecting the correct data type that will return a null value and then choose the correct variable
Complete name that will log a message to the console that the "object is null" from the lists.

Mark 1.00 out of Answer Area

1.00
 
public GameObject projectile;
void Start ()

if  
(projectlie == null)
{

Debug.Log("Object is null");
}

else
{

projectile = GameObject.FindWithTag("Projectile");
}

public int score; 

(score ==null) (hasTurned == null) public bool hasTurned; 

https://arit.co.th/lms/mod/quiz/review.php?attempt=5221&cmid=43 3/14
10/8/21, 5:23 PM ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate: Attempt review

Question 9
Select
whether code snippet is using ECS by selecting True or False.
Complete
using
Unity.Entities;
Mark 1.00 out of
1.00 using
UnityEngine;
public class
KeyboardComponent : MonoBehavior

{
     public float Horizontal;

     public float Vertical;


}

Select one:
True

False

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. False

b. True

https://arit.co.th/lms/mod/quiz/review.php?attempt=5221&cmid=43 4/14
10/8/21, 5:23 PM ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate: Attempt review

Question 11 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;

public text myText;

myText.settext = ("Score; " + score.ToString ());

Question 12
Select whether the code snippet is using ECS by selecting
True or False.
Complete
    using System;
Mark 1.00 out of
1.00     using UnityEngine;
    using Unity.Entities;

    [Serializable]
    public struct EntityData : IComponentData {

Select one:
True

False

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

Select one:
True

False

https://arit.co.th/lms/mod/quiz/review.php?attempt=5221&cmid=43 5/14
10/8/21, 5:23 PM ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate: Attempt review

Question 14 Match each Animator Function with the correct Parameters.

Complete
Note:  Each correct answer is worth partial credit.

Mark 1.00 out of


1.00 ("Animation", 1); SetInt
 

("Animation", .5f); SetFloat


 

("Animation", false); SetBool


 

("Animation"); SetTrigger
 

Question 15
Select whether statement about is True or False
Complete
A function will not execute unless it is called first.
Mark 1.00 out of
1.00

Select one:
True

False

Question 16
Evaluate if
the code snippet are using ECS libraries. Choose True for code snippet that is
using ECS and False for code
Complete
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

https://arit.co.th/lms/mod/quiz/review.php?attempt=5221&cmid=43 6/14
10/8/21, 5:23 PM ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate: Attempt review

Question 17
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  Movement : MonoBehaviour

      public float speed;

      public float turnSpeed;

      void Update ()

      {

      Movement();

      }

Select one:
True

False

Question 18
Evaluate if
the code snippet are using ECS libraries. Choose True for code snippet that is
using ECS and False for code
Complete
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

Question 19 When using Input.GetButtonDown, 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

https://arit.co.th/lms/mod/quiz/review.php?attempt=5221&cmid=43 7/14
10/8/21, 5:23 PM ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate: Attempt review

Question 20
Evaluate if
the code snippet are using ECS libraries. Choose True for code snippet that is
using ECS and False for code
Complete
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 21
This
window contains a list of every GameObject in the current Scene.
Complete

Mark 0.00 out of


1.00
Select one:
a. The Inspector Window

b. The Project Window

c. The Hierarchy Window

d. The Scene Window

Question 22
Select whether statement about is True or False
Complete
A function can be passed more than one type of parameter.
Mark 1.00 out of
1.00

Select one:
True

False

Question 23
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

https://arit.co.th/lms/mod/quiz/review.php?attempt=5221&cmid=43 8/14
10/8/21, 5:23 PM ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate: Attempt review

Question 24
Select whether statement about is True or False
Complete
A function that returns a value must use the return keyword.
Mark 1.00 out of
1.00

Select one:
True

False

Question 25
The inspector window gives you the ability to modify a
prefab.
Complete
This statement about the inspector window is True or
False
Mark 1.00 out of
1.00

Select one:
True

False

Question 26
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. bool hasLanded;

b. float Xmax;

c. GameObject projectile;

d. int score;

Question 27
An object can be moved, rotated, or scaled only if
working in the 3D view.
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

Question 28
The Static checkbox is used to signify to the Unity
Engine that an object will remain stationary
Complete
This statement about the inspector window is True or
False
Mark 1.00 out of
1.00

Select one:
True

False

https://arit.co.th/lms/mod/quiz/review.php?attempt=5221&cmid=43 9/14
10/8/21, 5:23 PM ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate: Attempt review

Question 29 Complete the code so that if coins is equal to extralife or is equal to bonus, it will increase lives by 1  and increase score
Complete by 1000.  Type the required characters into the text boxes to complete the code.

Mark 1.00 out of


If  (coins      extralife      coins   bonus)  {
1.00
== || ==
lives += 1;

score += 1000;
}

Question 30
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

Question 31 Given the output below, select the correct operators and place them in the target areas.

Complete
Enemies created:  0
Mark 1.00 out of
1.00 Enemies created:  1
Enemies created:  2

Enemies created:  3
Enemies created:  4

Enemies created:  5
Enemies created:  6

Enemies created:  7
Enemies created:  8

Enemies created:  9
Enemies created:  10

Answer Area

int enemies = 10;

void Start()
{

for (int i =  0;  i <=


  enemies; i ++
  )

Debug.Log("Enemies created:  " + i);


}

>= ‑‑

https://arit.co.th/lms/mod/quiz/review.php?attempt=5221&cmid=43 10/14
10/8/21, 5:23 PM ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate: Attempt review

Question 32 You need to set up a mecanim state machine.  This machine will manage the animations of an object that has the
Complete following 4 state:  TurningOff, On, TurningOn, and Selected.

Mark 0.50 out of


This machine's default state will be off.  Only when the object is in the On state, can it move to the Selected state.

1.00

Given the connections depicted in the graphic, match the object with the corresponding state.  Evaluate the graphic and
select the correct options from the lists.

1.  
Select
2.  
Turning On
3.  
On
4.  
Turning Off

Question 33 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

New Color(red) Color Red

Question 34 Select the correct


comment to use in the code snippet below:
Complete
//int day = Random.Range(1, 31);
Mark 1.00 out of
1.00
Select one:
a. //creates a number between 1 and 32

b. //increase the day by 1 until you hit the maximum of 32

c. //changes the day integer to a round number 

d. //creates a number between 1 and 31  

https://arit.co.th/lms/mod/quiz/review.php?attempt=5221&cmid=43 11/14
10/8/21, 5:23 PM ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate: Attempt review

Question 35
Public Class playerScript : MonoBehaviour  {

Complete
      public Light PlayerLight;

Mark 1.00 out of


1.00
      Void PlayerFunction ()  {

          PlayerLight.Enabled =
!PlayerLight.Enabled;

      }

Select one:
True

False

Question 36 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

https://arit.co.th/lms/mod/quiz/review.php?attempt=5221&cmid=43 12/14
10/8/21, 5:23 PM ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate: Attempt review

Question 37
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

Select one:
a. OnCollision

b. OnCollisionExit 

c. OnCollisionStay

d. OnCollisionEnter

Question 38 A new External Script Editor will be used and needs to be connected to unity's editor. Please select the correct answer

Complete

Mark 1.00 out of Select one:


1.00
a. External Script Editor can be selected via import packages

b. External Script Editor can be selected in the Unity Preferences window.

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.

https://arit.co.th/lms/mod/quiz/review.php?attempt=5221&cmid=43 13/14
10/8/21, 5:23 PM ชุดฝึกฝนเพื่อเตรียมความพร้อมในการสอบ Unity Certificate: Attempt review

Question 39 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 40 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 selecting
Mark 1.00 out of
the correct options.
1.00

Select one:
a. CharacterController)

b. Collider 

c. Rigidbody

d. Vector3

https://arit.co.th/lms/mod/quiz/review.php?attempt=5221&cmid=43 14/14

You might also like