Skip to main content
Version: v3

Hotfixers

Important Attention Reminder

Coding Style wiki


using OxGFrame.Hotfixer;

Core Mechanism Description

Hotfixers is mainly integrated with HybridCLR, responsible for the following at runtime:

  1. Supplementing AOT Metadata: Solving problems such as generic instantiation.
  2. Loading Hotfix DLLs: Injecting updated logic into the execution thread.

Patch Operation (Update and Check)

Core methods for performing hot-update checks and loading.

CheckHotfix

Starts downloading and loading all hot-update related files.

  • Automatic Configuration Mode

    • CheckHotfix(string packageName, Action errorAction = null)
    • CheckHotfix(PackageInfoWithBuild packageInfo, Action errorAction = null)
    • Reminder This mode automatically reads the hotfixdllconfig.conf configuration file in StreamingAssets.
  • Manual Specification Mode

    • CheckHotfix(string packageName, string[] aotAssemblies, string[] hotfixAssemblies)
    • Supports manual passing of a list of AOT assemblies and hotfix assemblies that need supplementation.

Status & Cache

  • IsDone()
    • Returns whether the hot update has completed loading.
    • Wait for Hotfixers.IsDone() before entering the main game logic and resource updates.
  • IsDisabled()
    • Checks if the hot-update feature is currently disabled in the environment (usually used for developer mode).
    • Important If HybridCLR is disabled, the Macro OXGFRAME_HYBRIDCLR_DISABLED must be used to effectively eliminate the hot-update flow.
  • Reset()
    • Resets hot-update flags and cache data. If it's the commercial version (supporting HotReload), Reset can be used to re-initialize.

Assembly Info

Provides queries for assemblies loaded at runtime.

AOT Assemblies (Metadata Assemblies)

  • GetAOTAssemblyNames(): Gets AOT assembly names (including .dll extension).
  • GetAotAssemblyNamesWithoutExtensions(): Gets AOT assembly names (without extension).

Hotfix Assemblies (Hotfix Assemblies)

  • GetHotfixAssemblyNames(): Gets hot-update assembly names (including .dll extension).
  • GetHotfixAssemblyNamesWithoutExtensions(): Gets hot-update assembly names (without extension).
  • GetHotfixAssembly(string assemblyName): Gets the loaded Assembly object by name.