Game Development 26 min read

Hot Update Technology in Game Development: Architecture Design and Validation of Asset Bundle + DLL Replacement C# Hot Update Scheme

This article reviews the evolution of hot‑update methods in games, critiques Lua, PuerTS, and HybridCLR, and proposes a minimalist Unity solution that combines AssetBundle resource updates with runtime DLL loading via reflection, demonstrating a simple, low‑dependency architecture validated on Android VR projects.

Tencent Cloud Developer
Tencent Cloud Developer
Tencent Cloud Developer
Hot Update Technology in Game Development: Architecture Design and Validation of Asset Bundle + DLL Replacement C# Hot Update Scheme

The article begins with a light‑hearted introduction, noting the release of "Black Myth: Wu Kong" and quickly shifting focus to the technical challenges of hot‑update in modern game development.

It reviews the history of hot‑update technologies in the game industry, starting from the early 2000s when Lua was first used in large‑scale games like World of Warcraft. The author lists the advantages that made Lua popular (easy integration, C‑Lua interop) and then enumerates its shortcomings (global scope, 1‑based indexing, lack of Unicode, missing type hints, etc.).

After discussing Lua, the article evaluates newer hot‑update solutions:

**PuerTS** – a JavaScript/TypeScript runtime for Unity/Unreal that offers strong static typing and a rich ecosystem.

**HybridCLR** – a C# hot‑update framework that adds an interpreter to IL2CPP, enabling dynamic DLL loading on iOS and Android.

Both solutions are praised for performance and developer experience, but the author argues that they introduce heavy dependencies and increase supply‑chain risk.

Consequently, the author proposes a minimalist approach: Asset Bundle + DLL replacement via reflection in C# . This method leverages Unity’s built‑in AssetBundle system for resource hot‑update and uses System.Reflection.Assembly.Load to load compiled DLLs at runtime, avoiding extra runtimes or scripting languages.

Architecture Design (Section 4.1):

SDK is delivered as a Unity package (shell) that only handles downloading and loading AssetBundles.

The shell loads a scene and a cube prefab from an AssetBundle.

It then downloads a DLL (packed as a TextAsset), loads it via reflection, and attaches the contained MonoBehaviour to the cube.

Version checking ensures incremental updates.

The design diagram and sequence diagram (included as images in the original) illustrate the flow from server to client, including Android‑Unity hybrid interaction.

C# Dynamic Loading Scheme (Section 4.1.4):

using System;
using UnityEngine;
using System.Reflection;

public class AssetBundleLoader : MonoBehaviour {
    void Start() {
        Debug.Log("[AssetBundleLoader::Start]");
        StartCoroutine(ReadAssetFromRequest());
    }
    IEnumerator ReadAssetFromRequest() {
        // Load AssetBundle with prefab
        UnityWebRequest cubeRequest = UnityWebRequestAssetBundle.GetAssetBundle(cubeUrl);
        yield return cubeRequest.SendWebRequest();
        AssetBundle cubeAB = DownloadHandlerAssetBundle.GetContent(cubeRequest);
        GameObject cube = Instantiate(cubeAB.LoadAsset
("Cube"));
        // Load DLL as TextAsset
        UnityWebRequest dllRequest = UnityWebRequestAssetBundle.GetAssetBundle(dllUrl);
        yield return dllRequest.SendWebRequest();
        AssetBundle dllAB = DownloadHandlerAssetBundle.GetContent(dllRequest);
        TextAsset dllBytes = dllAB.LoadAsset
("hotupdatecodesample.dll.bytes");
        Assembly asm = Assembly.Load(dllBytes.bytes);
        Type hotType = asm.GetType("HotUpdateCodeSample.HotCodeSample");
        cube.AddComponent(hotType);
    }
}

The article also provides the sample hot‑update script ( HotCodeSample.cs ) that logs messages on Start and Update , demonstrating that the dynamically loaded code runs correctly.

Validation Results (Section 5.3):

Resource hot‑update succeeded: the cube prefab was loaded from the AssetBundle.

Code hot‑update succeeded: the DLL‑contained MonoBehaviour executed, printing logs each minute.

Remaining risks are identified, such as compatibility of the .NET Framework DLL with Unity’s runtime and performance considerations under IL2CPP.

In conclusion, the author recommends the AssetBundle + DLL replacement approach for Android VR Unity projects due to its simplicity, low dependency footprint, and proven feasibility.

C++UnityAndroidVRAssetBundleGameDevelopmentHotUpdateHybridCLRPuerTS
Tencent Cloud Developer
Written by

Tencent Cloud Developer

Official Tencent Cloud community account that brings together developers, shares practical tech insights, and fosters an influential tech exchange community.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.