I am sharing with you guys some common questions. Let’s start from most simple ones to complex.

What is the order of Unity event function execution?

Moaaz Afzal
Nov 1 · 2 min read

Awake()
OnEnable()
Start()
FixedUpdate()
Update()
LateUpdate()
OnGUI()
OnApplicationQuit()
OnDisable()
OnDestroy()

What is a coroutine? Does coroutine runs on a new thread?

Coroutines are basically methods which you can pause for certain yield instruction. Yield instruction can be seconds, frames etc. No, Coroutines are not threads neither do they run on new thread. By default all code in unity runs in the main thread.

What is the difference between Update, LateUpdate, FixedUpdate?

Update runs once every frame. LateUpdate runs once every frame after Update is finished. Any calculations you have done in the update will be available in LateUpdate because it runs after Update finished. FixedUpdate is independent of frames, It can run multiple times within one single call of Update. FixedUpdate is a good place for physics calculations.

What is batching? What is the use of batching?

To Draw gameobjects on-screen engines issue a draw call to graphic API. Batching is used to reduce those draw calls. There are two types of batching:

Dynamic Batching: for small meshes, it groups similar vertices to gather and draws them in one go.

Static Batching: Groups static (non-moving) meshes to gather and draws them in one go.

What is the difference between Destroy and DestroyImmediate?

Destroy function destroys gameobject with a little delay but within the same frame. DestroyImmediate function destroys gameobject immediately and sets its reference to null. Note: Only use DestroyImmediate function when writing the editor code. Never Iterate over an array and destroy elements, it can cause problems.

What is difference between Occlusion Culling and Frustum Culling?

When using occlusion culling gameobjects which are not seen by the camera gets disable.

Frustum culling happens automatically if you have it checked on the Main Camera. In frustum culling objects renders get disabled.

In conclusion, in occlusion culling objects which are blocked by other objects also get disabled which in frustum culling don’t.

Is this possible to collide two mesh colliders? If so then how?

No, two mesh colliders cannot collide unless they are convex. It is because non-convex mesh colliders have holes between them which doesn’t make sense on collision, so you have to set the isConvex property on mesh collider to true if you want collision.

What are the asset bundles?

Asset bundles are assets that are downloadable. To decrease the size of the game sometimes you don’t push the user to download full content at once, rather you make asset bundles of each level and let the user download assets for that level if he want to play that level.

What is a Scriptable Object?

Scriptable objects are the data containers that allows you to store a large amount of independent shared data.

What are navmeshes in unity?

Navemeshes are normally used in pathfinding. These are a type of data structures that are designed to finding a path between some objects over a large space Categories

Moaaz Afzal

Written by

I am a Unity Game Developer who loves to code and communicate, I enjoy talking with people. Always ready to test my limits, I’m regularly learning new stuff yet

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade