Under Construction

The Blog

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

Join my community?Contact to join
Unity
Oct 12, 2026

Reducing C compile time# when a Unity project grows

This article explains how to reduce C# compile time in a growing Unity project by splitting code into separate assemblies with Assembly Definition files (.asmdef). It shows how to measure real edit-to-test time in the Editor, when to use Editor Iteration Profiler, and why compile time alone may not be the main bottleneck if domain reload is slower. Using an Inventory example, it demonstrates how to divide code by dependency into Runtime, UI, and Editor assemblies, how different kinds of code changes affect the compile scope, and why keeping shared APIs stable helps incremental compilation. It also covers how to migrate an existing project step by step, starting with Runtime or an independent Editor tool, while managing references and Auto Referenced settings.

Minh Khoa
24 min
70
19
Unity
Oct 9, 2026

Games under 150 MB need Local Addressables?

The article asks whether a game under 150 MB still needs Local Addressables, and answers yes when an infrequently used feature forces the starting scene to load large assets early. It explains that direct references can keep textures like ShopAtlas in memory as soon as the lobby opens, even if Instantiate(shopPopup) is delayed until the player clicks a button. Using a 2048 × 2048 RGBA32 texture as an example, it notes that the first mip level alone can use 16 MiB regardless of the source PNG size. The article then shows how moving ShopPopup into a Local group and changing UIManager to use AssetReferenceGameObject changes when the prefab and its dependencies are loaded, while still allowing offline use because the bundle ships with the app. It covers Addressables.InstantiateAsync, the effect of Awake() on first-open frame time, and Addressables.ReleaseInstance with trackHandle = true. Finally, it recommends comparing two builds with the Memory Profiler by taking snapshots when the lobby is stable, when Shop is open, and when it is closed, then checking whether ShopAtlas is still loaded and tracing references if needed. The conclusion is that this change is worthwhile only if it reduces lobby memory without hurting the UI response target, and if the same atlas is used throughout the whole session, moving only the Shop prefab may not save much memory.

Minh Khoa
14 min
102
20
Unity
Oct 5, 2026

Why does Unity run multiple physics steps after a frame spike?

This article explains why Unity may run multiple physics steps after a single frame spike. Using examples with `Physics.Simulate`, `Time.fixedDeltaTime`, `Time.maximumDeltaTime`, and `FixedUpdate()`, it shows how a long frame can force catch-up physics in the next frame, how lowering `maximumDeltaTime` reduces those extra steps but changes game time progression, and how to use CPU Profiler and Timeline to decide whether to optimize loading, physics cost, or gameplay systems that depend on game time.

Minh Khoa
18 min
100
32
Unity
Oct 2, 2026

How to split Addressable groups LiveOps for operation or hot update.

This article explains how to split Unity Addressables Groups and bundles for LiveOps and hot updates in a 300-level puzzle game. It distinguishes Group from Bundle, shows a practical split for Core, Level Packs, Events, and Shared content, and warns not to put everything into Shared. It also explains how Prevent Updates affects content update builds, why dependency changes can make patches larger than expected, and how to prepare a proper update pipeline with a Remote Catalog, saved addressables_content_state.bin files, and testing on an older app build. The main takeaway is to keep the base game playable, keep frequently changed content in small remote packs, and remember that Addressables updates content, not C# code.

Minh Khoa
19 min
57
18
Unity
Sep 28, 2026

Moving to Addressables: don’t just replace Resources.Load

This article explains that switching from Resources.Load to Addressables.LoadAssetAsync is not enough on its own. It compares Resources, AssetBundle, and Addressables, showing how each solves a different problem: Resources is easy but inflexible, AssetBundle gives content separation but requires dependency and unload management, and Addressables adds catalog, dependency, and reference-count handling. The post warns against using WaitForCompletion() to avoid redesigning asynchronous loading, and recommends loading UI content step by step, tracking handles and release timing, testing real builds, checking duplicated assets, and only then adding remote content if needed. The main point is that Addressables is valuable for controlling when content loads, how long it stays alive, and how it is updated.

Minh Khoa
24 min
82
32
Unity
Sep 25, 2026

Destroyed already, so why is Addressables still keeping it? RAM?

This article explains why a GameObject can be destroyed in Unity while its Addressables asset still stays in RAM. It covers the difference between destroying an instance and releasing an Addressables handle, how reference counts work with InstantiateAsync, LoadAssetAsync, and ReleaseInstance, and why a shared AssetBundle can keep textures and other assets in memory even after a shop or scene is closed. It also discusses pooling with loaded handles, and recommends checking Addressables Profiler and Memory Profiler instead of relying on the Hierarchy alone.

Minh Khoa
23 min
66
21
Previous
Page 2 of 11
Next