Unity: Unity Quiz 3


Khóa học qua video:
Lập trình Python All C# Lập trình C Java SQL Server 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. How can you define a variable in C# to see it in inspector?
private string myVariable;
string myVariable;
public string myVariable;
public myVariable;

Q2. This tool also utilizes the Shift key to reverse its ___. In this instance, using Shift erases painted trees and can be used in conjunction with the Ctrl key to only erase trees of the type selected in the palette?
physics
effects
service
All of the above

Q3. What are the regular update events?
Update, FixedUpdate, TimeFramedUpdate, LateUpdate
Update, FixedUpdate, LateUpdate
Update, FixedUpdate, TimeFramedUpdate
FixedUpdate, TimeFramedUpdate, LateUpdate

Q4. How can a component attached into the GameObject in UnityScript?
Type myComponent = Component();
var myComponent = GetComponent();
var myComponent = GetComponent("Component");
Type myComponent = GetComponent();

Q5. Which attributes are used in C# and UnityScript to prevent the property being shown in the Inspector?
@HideInInspector  in C# and [HideInInspector] in UnityScript
@HideInInspector  in UnityScript and [HideInInspector] in C#
@Hide  in UnityScript and [Hide] in C#
@Hide  in C# and [Hide] in UnityScript

Q6. In Unity, How you can change setting up the outpost model?
Under Materials—Generation is set to Per Texture
Under Animations—Split Animations is selected
All of the above

Q7. How can a screenshot captured?
GUI.Screenshot(file);
GUI.CaptureScreenshot(file);
Application.CaptureScreenshot(file);
Application.Screenshot(file);

Q8. Emission parameter has a Global Illumination setting, allowing you to specify how the apparent light emitted from this material will affect the contextual lighting of other nearby objects. There are following options?
Realtime
None
Baked
All of the above

Q9. Which of the following Extensible Plug-in Architecture used to increase Unity3D tools capacity?
UnityVS
UnityKit
NGUI
2DToolKit
Prime3 plugins

Q10. A C# class can only inherit from _____ class?
Base
One
Parent
Multiple

Q11. How can enumeration of colours be defined?
enum Colours : {Red, Blue, Green};
enumerationColours {Red,Blue,Green};
enum Colours {Red, Blue, Green};
enumeration Colours : {Red, Blue, Green};

Q12. Which one of the following is valid Generic Function Definition in UnityScript?
T FuncName();
function FuncName(): T;
void FuncName();
function FuncName.(): T;

Q13. What is the initial content of a C# script file?
public class Main : StateMachineBehaviour{ void Start(){} void Update(){} void Destroy(){} }
public class Main : MonoBehaviour{ void Start(){} void Destroy(){} }
public class Main : MonoBehaviour{ void Start(){} void Update(){} }
public class MainPlayer : MonoBehaviour { void Start(){} void Update(){} void Destroy(){} }

Q14. Using the following you are able to apply setting position of child transform, relative to parent in Unity?

hudCamera.transform.SetParent(hudSelectedObject.transform);
hudCamera.transform.localScale = Vector3.one;
ChudCamera.transform.localPosition= Vector3.zero;

hudCamera.transform.parent = hudSelectedObject.transform;
hudCamera.transform.position = new Vector3(0, 0, -50);
None of the others
Both

Q15. Which statement is True of Saved by Batching?
This refers to the total number of times per frame that the Unity engine calls on the lower-level rendering functionality to display your scene to the screen
This indicates the number of batching operations Unity managed to perform on your objects to reduce the number of draw calls
This is the total number of triangles being rendered in the current frame, after culling and clipping have been applied
The higher this value, the more complex and expensive your scene is to render

Q16. Which of the following Unity3D support languages NOT for writing shaders? (choose all that apply)
ShaderKit
CG
HLSL
ShaderLab

Q17. The component requires at least Shader Model 4 graphics hardware and _ support, including support for __ Textures with 32-bit floating-point format and linear filtering? (choose the 2 that apply)
API
2D
3D
Library

Q18. Which of the following are Pipeline of Unity Rendering?
Forward Tube
Vertex Lit
All of the others
Deferred Lighting

Q19. Which event function will be invoked when an application is closed? (choose all that apply)
OnApplicationQuit()
OnGUI()
OnDisable()
OnEnable()
OnStateUpdate()

Q20. In a scene, you can only have one
AudioSource
Camera
Light Source
AudioListener

Q21. How can you update using the following code function to play a sound once?

if(!Input.GetAxisRaw("Vertical") > 0 || Input.GetKey (KeyCode.Joystick1Button2))
{
  if(accelerate == false)
  {
    audio.Play();
  }
  accelerate = true;
}
else{
  accelerate = false;
}

public var acelerateSound: AudioSource;
// its attached to refenrenced
function Update(){
  if(Input.GetAxisRaw("Vertical") > 0 || Input.GetKey (KeyCode.Joystick1Button2))
  {
    accelerate = true;
    acelerateSound.Play();
  }
  else
    accelerate = false;
}

public var acelerateSound: AudioSource;
// its attached to refenrenced
function Update()
{
  if(!Input.GetAxisRaw("Vertical") > 0 || Input.GetKey (KeyCode.Joystick1Button2))
  {
    accelerate = true;
    acelerateSound.Play();
  }
  else
    accelerate = false;
}

if(Input.GetAxisRaw("Vertical") > 0 || Input.GetKey(KeyCode.Joystick1Button2))
{
  if(accelerate == false){
    audio.Play();
  }
  accelerate = true;
}
else{
  accelerate = false;
}

Q22. Which of the following can not be used to find GameObject(s)?

void OnGUI()
{
  GUILayout.Label("Header");
  GUILayout.Button("Button");
}

void OnGUI()
{
  GUI.Label("Header");
  GUI.Button("Button");
}

void OnGUI()
{
  Text text=new GameObject.AddComponent();
  Button button=new GameObject().AddComponent();
  text.text="Header";
  button.text="Button";
}
None of the above

Q23. Assets placed in which of these project folders will be copied as is to a folder on the target device?
Resources
Plugins
None of the others
Streaming Assets

Q24. How do you create a material asset (MyMaterial.mat) in Unity using Specular Shader through scripting?

static void CreateAsset(){
  Material material = new Material(Material.Find("Specular"));
  AssetDatabase.CreateAsset(material, "Assets/MyMaterial.mat");
}

static void CreatAsset(){
  Material material = Resources.Load("Specular") as Material;
  AssetDatabase.CreateAsset(material, "Assets/MyMaterial.mat");
}

static void CreateAsset(){
  Material material = new Material(Shader.Find("Specular"));
  AssetDatabase.CreateAsset(material, "Assets/MyMaterial.mat");
}
None of the above

Q25. Which of the following are Axe's properties of Inputs?
Gravity shadow
Sensitivity
Snap
Invert

Q26. What are the light mapping modes IS NOT available?
Single Lightmaps
Dual Lightmaps
Directional Lightmaps
Dynamic Lightmaps

Q27. The Level of Details (LOD) optimization technique allows:
to reduce the number of triangles rendered for an object as its distance from camera increases
to increase the number of triangles rendered for an object as its distance from camera increases
All of the others
None of the others

Q28. Which of these is NOT affected by position?
Point Lights
Directional Lights
Spot Lights
Area Lights

Q29. 3D, basic and non-GI lighting is performed on a per _____basis.
Invert
Vertex
GUI
Angle

Q30. The Animation _____ drop-down menu allows you to choose several different settings for how animations will play back (once, in a loop, and so on)—these can be set individually on the animations themselves, so if you do not wish to adjust a setting for all, then this can be left on Default?
Sprite s=new Sprite(textureRef,new Rect(0,0,1,1),new Vector2(0,0));
Sprite s= Instantiate(sprite) as Sprite;
All of the others
Sprite s=Sprite.Create(textureRef,new Rect(0,0,1,1),new Vector2(0,0));

Q31. To display the properties of an object of a class in an inspector, the class must be marked with the property;
[ShowInInspector]
[SerializeField]
[Serializable]
[RequireComponent]

Q32. Which is true about Input Manager ?
All of the others
It allows you to reference your inputs by axis name in scripting
It allows you to define input axis
It allows the players of your game to customize the controls to their liking

Q33. How can we disable physics in Unity?
To disable, go to user settings and set the fixed timestep to 10.
That's as disabled as it gets. Go to date setting and set the fixed timestep to 10 which is the maximum.
All of the others
The best way to disable if to go to time settings and set the fixed timestep to 10 which is the maximum

Q34. Which of these is a greedy heuristic searching algorithm?
Best first search
Breadth first search
A* Search
None of the above

Q35. Count all possible paths in 3x3 matrix; from topleft corner to bottom right corner:
5
4
6
9

Q36. How can you make a Navmesh agent move to a location?
GetComponent().MoveTo (point);
GetComponent().GoTo(hit.point);
GetComponent().SetDestination(point);
None of the others

Q37. A Navmesh agent can be which of the following shapes:
Box
Capsule
Sphere
Cylinder

Q38. Which of these audio file formats is not supported by Unity?
.s3m
.m4a
.it
.xm

Q39. How do you play an audio clip at a specific frame of an animation in unity 3D?
Use AnimationEvents to call a function at a specific frame in an animation where the audio can be played
Click on a state in the animator, and arrange the transitions in the inspector in the ordering which they need to be prioritize
Use AudioEvents to call a function at a specific frame in an animation where the audio can be played
All of the above

Q40. What does the following code do?
float speed=10;
void Update(){
  transform.Translate(Vector3.forward*speed);
}
Moves the object this script is attached to by 10 units per second in the local positive Z axis direction
Moves the object this script is attached to by 10 units per frame in the local positive Z axis direction
Moves the object this script is attached to by 10 units per frame in the world positive Z axis direction
Moves the object this script is attached to by 10 units per second in the world positive Z axis direction

Q41. In order to detect a collision between two objects, A and B, which of the following criteria need to be satisfied?
A and B both have colliders attached to them
A and B both have non kinematic rigidbodies and colliders attached to them
A and B both have non kinematic rigidbodies attached. Only A has a collider
A and B both have kinematic rigidbodies and colliders attached.
A and B both colliders. Only A has a non kinematic rigidbody attached.

Q42. A ray contains the following
Direction and origin
Magnitude and direction
Magnitude and origin
None of the above

Q43. The value of Time.deltaTime contains
The current time of the game
The duration of the current frame
The duration of the last frame
The duration of each frame

Q44. A coroutine runs on a _____.
separate thread
same thread
separate process
None of the above

Q45. Which of the following is attached to every GameObject
AudioSource component
Transform component
Renderer component
None of the above

Q46. Which of the following statement is TRUE about 2D and 3D Objects?
2D and 3D object is not in scene
2D Object is in scene and pickable
2D Object is not pickable (in scene)
3D Object in scene

Q47. How do you record a transaction event by a user through Unity Analytics?
Record.Transaction(string productId, decimal price, string currency, string receipt, string signature);
Analytics.Transaction(string productId, decimal price, string receipt, string signature);
Analytics.Transaction(string productId, decimal price, string currency, string receipt, string signature);
None of the above

Q48. Which namespace must be included to use the DLLImport attribute?
System.Collections
System.Runtime.InteropServices
System.Native.Plugins
None of the above

Q49. What are the types of Raycasters?
Graphic Raycaster
Physics 2D Raycaster
Motion Raycaster
Physics Raycaster

Q50. 2048x2048 pixel resolution image with format uncompressed RGBA 32 bits (without mipmaps) will take up how much memory when loaded?
32MB
16MB
4MB
1MB

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