





















































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






















































































Question 1. Which Unity lifecycle method is called exactly once before any Start methods are executed? A) Awake B) OnEnable C) Start D) Reset Answer: A Explanation: Awake is invoked when the script instance is being loaded, before any Start calls, making it ideal for initialization that other scripts might depend on. Question 2. In the new Unity Input System, which class represents a collection of bindings for a single action? A) InputActionMap B) InputBinding C) InputActionAsset D) InputControlScheme Answer: B Explanation: InputBinding stores the actual device‑specific binding information (e.g., keyboard key, gamepad button) for an InputAction. Question 3. Which design pattern is most appropriate for providing a globally accessible game manager while preventing multiple instances? A) Factory B) Observer C) Singleton D) Command Answer: C
Explanation: The Singleton pattern ensures a class has only one instance and provides a global point of access, perfect for managers that must be unique. Question 4. When using Addressables, which method loads an asset asynchronously and returns a handle you must release? A) LoadAssetAsync
Question 9. What is the primary advantage of using object pooling for frequently instantiated GameObjects? A) Reduces memory fragmentation B) Improves code readability C) Enables multithreading D) Guarantees deterministic behavior Answer: A Explanation: Object pooling reuses existing objects, avoiding repeated allocations and deallocations, which reduces memory fragmentation and GC spikes. Question 10. Which Unity API is used to schedule a method call after a delay without using coroutines? A) InvokeRepeating B) StartCoroutine C) WaitForSeconds D) Invoke Answer: D Explanation: Invoke schedules a method to be called once after a specified time delay. Question 11. In Unity Ads, which callback is triggered when a rewarded video finishes successfully and the reward should be granted? A) OnAdFailedToLoad B) OnAdClicked C) OnUnityAdsShowComplete D) OnUnityAdsReady Answer: C
Explanation: OnUnityAdsShowComplete provides the result (e.g., COMPLETED) indicating the user watched the ad fully and is eligible for the reward. Question 12. Which C# collection provides O(1) average‑time lookup by a unique key? A) List
C) Add a Reflection Probe component D) Use a Standard Shader material Answer: B Explanation: The HDRP Asset must have Ray Tracing enabled; then ray‑traced reflections can be configured via volumes. Question 18. Which Unity API provides a way to run code on a background thread without blocking the main thread? A) IEnumerator B) async/await with Task C) Update D) FixedUpdate Answer: B Explanation: Using async methods returning Task and awaiting them runs the work on a thread‑pool thread, keeping the main thread responsive. Question 19. Which serialization format is most efficient for transmitting large amounts of game state over a network? A) XML B) JSON C) BinaryFormatter D) PlayerPrefs Answer: C Explanation: BinaryFormatter (or a custom binary format) yields compact byte streams, reducing bandwidth compared to text‑based formats.
Question 20. In Unity’s Physics system, which setting determines whether two layers can collide with each other? A) Rigidbody.collisionDetectionMode B) Physics.IgnoreLayerCollision C) Physics2D.gravity D) Collider.isTrigger Answer: B Explanation: Physics.IgnoreLayerCollision(layer1, layer2, true/false) globally disables or enables collisions between the specified layers. Question 21. Which Unity class is used to create a custom property drawer for a serialized field? A) EditorWindow B) PropertyAttribute C) PropertyDrawer D) CustomEditor Answer: C Explanation: Deriving from PropertyDrawer allows you to control how a specific property type is rendered in the inspector. Question 22. Which coroutine yield instruction pauses execution until the next fixed‑update step? A) WaitForEndOfFrame B) WaitForSeconds C) WaitForFixedUpdate D) null Answer: C
D) NavMeshLink Answer: A Explanation: NavMeshSurface provides APIs to build or update a NavMesh on the current scene geometry during gameplay. Question 26. Which Unity UI event system class is used to detect pointer clicks on UI elements? A) EventTrigger B) IPointerClickHandler C) Button D) GraphicRaycaster Answer: B Explanation: Implementing IPointerClickHandler on a MonoBehaviour receives OnPointerClick callbacks when the UI element is clicked. Question 27. Which Unity profiling tool shows the order in which draw calls are submitted to the GPU? A) CPU Profiler B) Memory Profiler C) Frame Debugger D) Timeline Answer: C Explanation: The Frame Debugger visualizes each render step, including the sequence of draw calls. Question 28. Which attribute marks a method as a Unity test that can be run by the Unity Test Runner?
A) [Test] B) [UnityTest] C) [RunTest] D) [TestMethod] Answer: B Explanation: [UnityTest] indicates a coroutine‑based test that can yield and run within the Unity engine context. Question 29. When using the ScriptableObject pattern for game data, which method should you call to create an instance at edit time? A) new ScriptableObject() B) ScriptableObject.CreateInstance
Answer: B Explanation: SceneManager.sceneLoaded is raised each time a scene finishes loading, regardless of load mode. Question 34. Which design pattern is best suited for decoupling UI button clicks from game logic without a direct reference? A) Observer (UnityEvent) B) Singleton C) Factory D) Mediator Answer: A Explanation: UnityEvent implements the observer pattern, allowing UI components to invoke listeners that are set up in the inspector. Question 35. Which of the following is a recommended practice when writing async code in Unity to avoid race conditions? A) Use Unity’s main thread for all async work B) Lock shared data with a mutex C) Always await the Task before accessing Unity objects D) Use Update to poll for completion Answer: C Explanation: Unity objects must be accessed on the main thread; awaiting ensures the continuation runs on the Unity synchronization context. Question 36. Which Unity class provides a way to draw gizmos only when the game is playing? A) Gizmos
B) Debug C) Handles D) EditorGUI Answer: A Explanation: Gizmos.Draw* methods are called from OnDrawGizmos and OnDrawGizmosSelected; they render in both edit and play mode, but you can conditionally draw only when Application.isPlaying. Question 37. Which Unity attribute forces a field to be displayed as a read‑only property in the inspector? A) [ReadOnly] (custom) B) [DisableInInspector] C) [HideInInspector] D) Unity does not provide a built‑in read‑only attribute; you must create a custom PropertyDrawer. Answer: D Explanation: Unity has no native read‑only attribute; developers typically implement a custom PropertyDrawer to achieve this behavior. Question 38. When implementing a finite state machine for an NPC, which Unity feature can be used to automatically transition between states based on parameters? A) NavMeshAgent B) Animator Controller C) ScriptableObject D) Timeline Answer: B
C) null D) WaitForFixedUpdate Answer: A Explanation: WaitUntil evaluates a predicate each frame and resumes when it returns true, perfect for waiting on async operation completion. Question 42. Which Unity API is used to perform a raycast that ignores a specific layer? A) Physics.Raycast with layerMask excluding that layer B) Physics2D.Raycast with ignoreLayer C) Camera.ScreenPointToRay with ignoreLayer D) Physics.RaycastAll and filter results Answer: A Explanation: By providing a layerMask where the unwanted layer’s bit is cleared, Raycast will ignore colliders on that layer. Question 43. In Unity Ads, which method should be called to initialize the SDK on a platform that requires a game ID at runtime? A) Advertisement.Initialize(gameId, testMode) B) UnityAds.Initialize(gameId) C) Advertisement.Load(placementId) D) UnityAds.Initialize() Answer: A Explanation: Advertisement.Initialize takes the game identifier and a testMode flag to start the Ads service. Question 44. Which C# keyword enables a method to be overridden in a derived class?
A) virtual B) abstract C) override D) sealed Answer: A Explanation: Declaring a method as virtual allows derived classes to provide an override implementation. Question 45. Which Unity UI component should you use to allow a user to scroll through a list of items? A) ScrollRect B) ScrollView C) Slider D) Scrollbar Answer: A Explanation: ScrollRect handles the viewport, content, and optional scrollbars for scrollable UI areas. Question 46. Which of the following is NOT a valid way to improve draw‑call performance on mobile? A) Combine meshes with static batching B) Use GPU instancing C) Increase the number of materials per object D) Reduce overdraw with proper UI ordering Answer: C Explanation: More materials per object increase draw calls; combining meshes or using instancing reduces them.
Answer: A Explanation: Implementing IPostprocessBuildWithReport lets you execute code after the build finishes. Question 50. Which Unity class is used to store a collection of related assets that can be loaded together via Addressables? A) AssetBundle B) ScriptableObject C) AddressableAssetGroup D) ResourcesFolder Answer: C Explanation: AddressableAssetGroup groups assets for labeling, profiling, and runtime loading. Question 51. Which Unity method is called when a ScriptableObject is first created in the editor? A) OnEnable B) Awake C) Reset D) OnValidate Answer: C Explanation: Reset is invoked when the asset is created or when the user clicks the Reset button in the inspector, allowing default initialization. Question 52. Which of the following Unity components is essential for enabling physics‑based character movement using forces instead of direct transform changes? A) CharacterController B) Rigidbody
C) NavMeshAgent D) Transform Answer: B Explanation: Rigidbody integrates with the physics engine, allowing forces, torques, and collisions to drive movement. Question 53. Which Unity class provides a low‑level API for manually submitting draw calls? A) Graphics B) GL C) CommandBuffer D) MeshRenderer Answer: C Explanation: CommandBuffer lets you record rendering commands (draw calls, blits, etc.) and execute them at specific pipeline points. Question 54. Which design pattern best fits a system where multiple UI panels need to be opened/closed based on a centralized state machine? A) Observer B) Mediator C) Factory D) Prototype Answer: B Explanation: Mediator centralizes communication between UI components, preventing direct dependencies.