Under Construction

The Blog

Insights, tutorials, and stories from the world of software development.

Join my community?Contact to join
Unity
Feb 23, 2026

UniTask & Related things

This article explains what UniTask is and why it is widely used in Unity. It describes how UniTask, made by Cysharp, is designed to replace IEnumerator + StartCoroutine, standard async Task, and older callback patterns. The post compares the main problems of traditional Unity coroutines and .NET Task in Unity, especially poor control, no proper cancellation, missing return values, and heavy GC allocations. It then shows how UniTask solves these issues with zero-allocation async/await, awaitable Unity workflows such as scene loading, animation, frame waiting, and DOTween, plus support for CancellationToken and real multithreading. The article also reviews alternatives like pure Coroutine, async Task, and third-party promise libraries, and concludes with practical cases where UniTask is useful in real games and why many Unity studios rely on it.

Minh Khoa
9 min
178
32
Unity
Feb 23, 2026

Coroutine, Async, UniTask & Multithreading in Unity/C#

This article explains Coroutine, async/await, UniTask, and real multithreading in Unity/C#. It shows that Coroutine is a Unity-managed pseudo-asynchronous mechanism on the main thread, good for animation, delays, and simple gameplay flow, but not true multithreading. It then covers C# async/await, noting that async does not always mean multithreading and can also be used for background tasks or non-blocking I/O. Next, it introduces UniTask as a Cysharp library that brings async/await into Unity, supports awaitable yield instructions, returns values, and uses a zero-allocation struct-based design for better Unity performance. The article also reviews true multithreading APIs in C# such as Thread, ThreadPool, Task, Parallel.For, and PLINQ, and warns that Unity APIs like GameObject and Transform are not thread-safe. Finally, it compares the approaches and recommends using Coroutine for small gameplay flow, UniTask for scene loading and async operations, and Task/Thread only for heavy data processing while syncing results back to the main thread.

Minh Khoa
15 min
257
33
Redis
Feb 19, 2026

Redis

This article explains what Redis is: a very fast in-memory temporary data store, like RAM for servers, used to cache short-lived data. It describes Redis’s key-value data model, why it is fast, and common uses such as cache, session storage, job queues, pub/sub messaging, and leaderboards/counters. It also covers persistence with RDB and AOF, TTL-based automatic expiration, cluster mode with master and replica nodes, and other uses in game servers, IoT, machine learning, and analytics.

Minh Khoa
10 min
131
38
Unity
Feb 18, 2026

Serialization

This article explains Serialization and Deserialization in plain terms: converting an object into storable or transferable data such as strings, files, bytes, or JSON, and converting that data back into an object. It uses a game-save example to show how this works in practice, then explains why serialization is needed for saving/loading, network communication, APIs, databases, cloud storage, Unity Editor and Inspector display, and cache or config data. It also outlines the basic flow with C# and describes serialization in Unity, including how scene, prefab, and ScriptableObject data are saved and what Unity can serialize. The post then compares common types of serialization—JSON, Binary, XML, and custom serialization—and gives a Unity game save system example for saving and loading player data. Finally, it summarizes the benefits of serialization, such as easier storage and transfer and support for common formats, as well as the risks, including unsupported types, editable JSON data, binary version compatibility issues, and the need for security in online use.

Minh Khoa
10 min
123
41
Unity
Feb 18, 2026

Physics Tunneling

This article explains Physics tunneling in Unity, which happens when a fast-moving object passes through another collider between physics frames so collision events like OnCollisionEnter and OnTriggerEnter are missed. It covers the main causes, including fixed-timestep physics, default Discrete collision detection, and inaccurate Rigidbody settings, then offers fixes such as Continuous and Continuous Dynamic collision modes, lowering Fixed Timestep, limiting speed, using Raycast checks, enabling Rigidbody Interpolation, making colliders thicker, and avoiding direct Transform movement on Rigidbody objects.

Minh Khoa
10 min
112
34
Unity
Feb 18, 2026

Lifecycle of GameObject

This article explains the full lifecycle of a Unity GameObject with MonoBehaviour, from Awake, OnEnable, Start, Update, LateUpdate, FixedUpdate, OnDisable, and OnDestroy to special callbacks like OnApplicationPause, OnApplicationFocus, OnApplicationQuit, OnValidate, and Reset. It also covers script execution order, coroutine behavior, Editor-specific lifecycle features such as ExecuteInEditMode and OnDrawGizmos, and advanced practices like dependency injection, pooling, async workflows, and separating responsibilities across lifecycle methods.

Minh Khoa
10 min
123
33
Previous
Page 9 of 9
Next