Unity: Unity Quiz 4


Khóa học qua video:
Lập trình Python All Lập trình C# All SQL Server All Lập trình C All Java PHP HTML5-CSS3-JavaScript
Đăng ký Hội viên
Tất cả các video dành cho hội viên

(nhấn nút 'Result' để biết kết quả)

Q1. Which of the following is Core Optimization of GPU Limitations?
Memory Bandwidth
Resolution
All of the others
Lighting

Q2. What is the output of the following code:
GameObject obj = new GameObject("aGameObject");
GameObject.Destroy(obj);
Debug.Log(obj.name);
Error: GameObject "obj" is destroyed before it is used
aGameObject
Null Reference Exception

Q3. Virtual Functions are functions
That do not have any implementations in the base class and must be implemented by the derived classes
Functions that do not have any implementations in base classes or derived classes
None of the others
Functions that can be implemented by base classes and overridden by derived classes

Q4. Tree Editor lets you create and edit
Binary Tree for storing data
All of the others
3D Tree to be placed in scene
None of the others

Q5. An animation can be played using
Animator.Play();
Animation.Play();
Animator.SetTrigger();
All of the above

Q6. The Core Optimization of CPU Limitations are:
Scriptin
Physics
None of the others
Memory

Q7. How can you playback input from a microphone in Unity?

AudioSource aud = GetComponent();
aud.clip = Microphone.Start("Built-in Microphone", true, 10, 44100);
aud.Play();

AudioSource aud = GetComponent();
aud.clip = Microphone.Record("Built-in Microphone", true, 10, 44100);
aud.Play();

AudioSource aud = GetComponent();
aud.buffer = Microphone.Start("Built-in Microphone", true, 10, 44100);
aud.Play();
None of the above

Q8. Which option is used to initialize consumable IAP in Unity?

public class MyIAPManager : IAPListener {
  private IStoreController controller;
  private IExtensionProvider extensions;
  public MyIAPManager() {
    var builder = new ConfigurationBuilder(StandardPurchasingModule.Instance());
    builder.AddProduct("100_gold_coins", ProductType.Consumable, new IDs {
      {"100_gold_coins_google", GooglePlay.Name},
      {"100_gold_coins_mac", MacAppStore.Name}
    });
    UnityPurchasing.Initialize(this, builder);
  }
}

public class MyIAPManager : IStoreListener {
  private IStoreController controller;
  private IExtensionProvider extensions;
  public MyIAPManager() {
    var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
    builder.AddProduct("100_gold_coins", ProductType.Consumable, new IDs {
      {"100_gold_coins_google", GooglePlay.Name},
      {"100_gold_coins_mac", MacAppStore.Name}
    });
      UnityPurchasing.Initialize(this, builder);
  }
}

public class MyIAPManager : StoreListener {
  private IStoreController controller;
  private IExtensionProvider extensions;
  public MyIAPManager() {
    var builder = new ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
    builder.AddProduct("100_gold_coins", ProductType.Consumable, new IDs {
      {"100_gold_coins_google", GooglePlay.Name},
      {"100_gold_coins_mac", MacAppStore.Name}
    });
    UnityPurchasing.Initialize(this, builder);
  }
}
None of the above

Q9. Which of these is the correct order in which the methods will execute?
Update, Start, LateUpdate, Awake
Start, Awake, Update, LateUpdate
Awake, Start, Update, LateUpdate
Update, LateUpdate, Start, Awake

Q10. Which of the following code will displays a valid Button?
void OnGUI(){GUI.Button(new Rect(20,40,80,20), "myButton");}
void OnGUI(){GUI.Button("myButton");}
void OnGUI(){GUI.Button(new Rectangle(20,40,80,20), "myButton");}
void OnGUI(){GUI.Button(new Rect(80,20), "myButton");}

Q11. How you can a method invoked in 5 seconds?
Invoke(myMethod, 5000);
Call(myMethod, 5000);
Call(myMethod, 5);
Invoke(myMethod, 5);

Q12. A material contains the following:
Mesh and texture
Shader and mesh
Texture and Shader
Mesh, texture, and shader

Q13. Which of the following tangent types can be used to ensure smoothness?
Free Smooth
Linear
Flater
Constance

Q14. To play an animation with the Animation component, the imported animation must be of the type:
Generic
Humanoid
All of the others
Legacy

Q15. Which shader would you use to apply transformation operations?
Pixel Shader
Vertex shader
Fixed function shader
Surface shader

Q16. Which of the following will call MyUpdateMethod() every 1 second?

void Start(){
  StartCoroutine(CallMyMethod());
  gameObject.SetActive(false);
}
IEnumerator CallMyMethod(){
  while(true){
    yield return new WaitForSeconds(1);
    MyUpdateMethod();
  }
}

void Start(){
  Invoke("MyUpdateMethod",1);
  gameObject.SetActive(false);
}

void Start(){
  InvokeRepeating("MyUpdateMethod",1,1);
  gameObject.SetActive(false);
}
float lastUpdateTime=0.0f;
void Start(){
  gameObject.SetActive(false);
}

void Update(){
  if(Time.time-lastUpdateTime>1)
  {
    lastUpdateTime=Time.time;
    MyUpdateMethod();
  }
}

Q17. An animation controller parameter that has two possible values:
Boolean
Trigger
All of the others
None of the others

Q18. Shadow cascading is used to reduce:
Perspective aliasing
Occlusion Culling
None of the others
Illumination

Q19. The process by which objects that are hidden behind other objects are not rendered is known as:
Frustrum culling
Backface Culling
Occulusion Culing
Contribution Culling

Q20. A shader that runs for every fragment is called:
Pixel Shader
Vertex Shader
Fixed Function Shader
Surface Shader

Q21. An object's mesh can be accessed using:
Mesh component
MeshRenderer component
MeshFilter component
None of the above

Q22. What are the following Light's properties in Unity?
Shadow
Intensity
Deferred
Range

Q23. Animation clips imported from external sources could include followings?
Humanoid animations captured at a motion capture studio
Animations created from scratch by an artist in an external 2D application (such as 3DS Max or Maya)
Multiple clips cut and sliced from a single imported Library
Animation sets from 3rd-party libraries (eg, from Unity's asset store)

Q24. What are the Precomputed Realtime GI as follows?
Layout Systems
Clustering
Light Transform
Tetrahedralize Probes

Q25. A prefab in the assets folder of the project can hold references to:
Other game objects in the scene in which it is loaded
Other prefabs in the project folder
None of the others
Components in itself or in its own children

Q26. What is the meaning of GUI?
Graphical User Interface
Google User Interface
Good User Interface
None of the above

Q27. Which of the following are NOT properties of Lights?
Shadow
Intensity
Range
Deferred

Q28. The distance at which the real time shadows blend into the lightmapped shadows in Unity is determined by:
Occlusion Distance property
Blend Distance property
Shadow Distance property
Bake Distance property

Q29. Which option describes the Destroy (Game Object) method?
Destroys a game object at the end of the current code block
Destroys a game object at the end of the current method execution
Does not destroy the game object, only returns it to an object pool
Destroys a game object at the end of the current frame

Q30. 9 sliced images are supported by which colliders? (choose all that apply)
BoxCollider2D
PolygonCollider2D
CircleCollider2D
EdgeCollider2D

Q31. How can you call methods in C# scripts from unityscript code?
Place C# script in Plugins or Standard Assets folders and unityscript script in another folder
Place both scripts into the Plugins or Standard Assets folders of the project
Place Unityscript script in Plugins or Standard Assets and C# script in another folder
None of the above

Q32. What is the output of the following code assuming that myGameObject does not exist in the scene?
using UnityEngine;
using System.Collections;
public class Example : MonoBehaviour {
  void Start() {
    GameObject go = GameObject.Find("myGameObject");
    Debug.Log(go.name);
  }
}
NullPointerException
null
NullReferenceException
myGameObject

Q33. In Unity 3D, the following code will allow you to hide an object.
object.SetActive(true);
object.SetActive = 1;
object.SetActive(false);
object.SetActive = 0;

Q34. Which of the following are ways to programmatically access an active GameObject?
GameObject.Find()
All of the others
GameObject.FindObjectsWithTag()
The variable gameObject
GameObject.FindWithTag()

Q35. Which method would you use to programmatically access a GameObject with a unique name?
GameObject.Find()
GameObject.FindWithTag()
GameObject.FindObjectsWithTag()
gameObject

Q36. Which method would you use to programmatically access the GameObject the script is attached to?
GameObject.Find()
GameObject.FindWithTag()
The variable gameObject
GameObject.FindObjectsWithTag()

Q37. Which of the following will provide programmatic access to an array of GameObjects?
GameObject.FindObjectsWithTag()
GameObject.Find()
None of the others
GameObject.FindWithTag()

Q38. If GameObject.Find() does not find the specified GameObject, what will happen?
It searches again until it finds it.
The program crashes.
It will return null (a programming representation for "nothing")
It will print out an error.

Q39. If GameObject.FindObjectsWithTag() does not find any GameObjects with the specified tag, what happens?
The program crashes.
It will print an error message.
It will return null (a programming representation for "nothing")
It will return an empty array.

Q40. A character starts at (0, 3, -1) and has a velocity of (0, 1,1) units per second. What is the character's new position after 1 second?
(0, 3, -1)
It cannot be determined.
(0, 4, 0)
(0, 2, -2)

Q41. You want to program an enemy to travel towards the player's character. Which vector operation would you use to accomplish this?
addition
normalize
subtraction
magnitude
multiplying by a scalar (or number)

Q42. What does Vector.Normalize() do?
It gives you a vector that is not weird.
It takes a vector and returns the same vector with the opposite direction.
It take a vector and returns the same vector with a magnitude of 1.
It tells you whether two vectors form a 90° angle.

Q43. If a GameObject has a Rigidbody component, it can...
can collide with other objects
not be moved
not be rotated
be affected by physics

Q44. Physic Materials can be added to...
Mesh Renderer Components
Rigidbody Components
GameObjects
Collider Components

Q45. A Physic Material with a friction value of 0 would feel like ...
ice
gravel
grass
normal

Q46. A Physic Material with a bounciness value of 0 would cause
a little bouncing
no bouncing
lots of bouncing
objects to slide on it

Q47. Which of the following are always true?
Colliders are the same shape as the GameObject their attached to
Colliders can be combined
Colliders are the same size as the GameObject their attached to
Colliders make it so that GameObjects bump into each other

Q48. What are the types of Raycasters?
Project Window
Unity
Interface/Window

Q49. Here is a list of some of the numerous features of Unity from the technical point of view; except.
Creating and Destroying GameObjects
Events for GameObject
Rearranged
Dealing with Vector Variables and Timing Variables
Coroutine and Return Types

(Ghi chú: Phần câu hỏi Qi có nền màu Green thể hiện đáp án đúng)
« Trước: Unity Quiz 3
Khóa học qua video:
Lập trình Python All Lập trình C# All SQL Server All Lập trình C All Java PHP HTML5-CSS3-JavaScript
Đăng ký Hội viên
Tất cả các video dành cho hội viên
Copied !!!