Sample questions
Un Prefabs Instantiate Pooling AddressablesDifficulty 1
In Unity, what is the core difference between a Prefab asset and a Prefab instance in a scene?
- aA Prefab asset only exists in code, an instance only exists in the Editor
- bA Prefab instance is the original file, the asset is a temporary copy
- cThe asset is the stored template; the instance is its linked copy placed in a scene✓
- dThere is no difference, Unity uses the two terms interchangeably
Explanation:The Prefab asset is the reusable template stored in the Project folder; a Prefab instance is a copy of that template placed into a scene, which stays linked to the asset unless the connection is broken.
Un Prefabs Instantiate Pooling AddressablesDifficulty 2
What does Object.Instantiate(bulletPrefab) do when called with only the prefab reference?
- aIt only reserves memory for the object but does not create it yet
- bIt creates a new clone in the active scene and returns it✓
- cIt moves the existing prefab asset into the scene, removing it from the Project
- dIt creates a clone but leaves it disabled until
SetActive(true) is called manually
Explanation:Object.Instantiate(original) clones the given object and places the clone in the active scene using the original's position, rotation and (for non-Components) enabled state; it returns a reference to the new clone.
Un Prefabs Instantiate Pooling AddressablesDifficulty 2
Which Object.Instantiate overload lets you place the new instance directly under a given parent Transform?
- a
Instantiate(original, parent)✓ - b
Instantiate(original, parent.gameObject) - c
Instantiate(original).SetParent(parent) — this is the only supported overload - d
Instantiate(original, parent.name)
Explanation:Unity provides Instantiate(Object original, Transform parent) as a documented overload that parents the new instance under the given Transform as part of the instantiation call itself.
Un Prefabs Instantiate Pooling AddressablesDifficulty 2
Which Object.Instantiate overload lets you set the spawned object's world position and rotation directly, without editing the prefab's own transform?
- a
Instantiate(original, transform) - b
Instantiate(original) followed by editing .transform.localPosition only - cThere is no such overload, position must always be set after instantiation
- d
Instantiate(original, position, rotation)✓
Explanation:Instantiate(Object original, Vector3 position, Quaternion rotation) spawns the clone directly at the given world position and rotation in one call, overriding the prefab's own transform values.
Un Prefabs Instantiate Pooling AddressablesDifficulty 3
When Object.Instantiate creates a new GameObject from a prefab, in the same frame as the call, which lifecycle method(s) run immediately?
- aOnly
Start, because Awake was already called once when the prefab asset was imported - b
Awake and OnEnable run immediately; Start is deferred until just before the next Update✓ - c
Update runs immediately once, then Awake and Start run on the next frame - dNothing runs until the object is manually enabled with
SetActive(true)
Explanation:Instantiate runs Awake and, for an active object, OnEnable synchronously as part of the call. Start is not called yet — it runs later, right before the object's first Update, which for objects created mid-frame is typically the next frame.
Un Prefabs Instantiate Pooling AddressablesDifficulty 1
What does calling Destroy(gameObject) do to that GameObject?
- aIt marks the GameObject for removal rather than destroying it immediately✓
- bIt disables the GameObject permanently but keeps it in memory forever
- cIt immediately frees the GameObject's memory before the line after the call runs
- dIt only works on Components, never on whole GameObjects
Explanation:Destroy schedules the object for removal rather than removing it on the spot; the object and its components are actually destroyed later in the same frame, after Update but before rendering.