MirageNullPrefabFix

v1.0.2·Updated 2026-08-21

Companion hotfix: stops Mirage's StartOfRound NullReferenceException on v81 when other mods leave null NetworkPrefab entries. Loads alongside Mirage.

About this mod Author’s original text

Mirage Null-Prefab Fix

A tiny companion hotfix for qwbarch's Mirage on Lethal Company v81. Install it alongside Mirage — it does not replace or modify Mirage.

The bug

On v81, Mirage's StartOfRound.Start hook walks NetworkManager.NetworkConfig.Prefabs and calls GetComponent() on each prefab. Some content mods register malformed NetworkPrefab entries (duplicate/zero GlobalObjectIdHash) that leave a null Prefab in that list. Calling GetComponent on it throws a NullReferenceException that aborts the hook — which can leave you staring at a black void in orbit (camera never enables) with soundmanager log spam.

The fix

This mod removes the null-Prefab entries from NetworkConfig.Prefabs in a StartOfRound.Start prefix. Mirage runs orig.Invoke before its own loop, so the prefix executes first and Mirage never sees a null. It only touches vanilla Netcode — it does not copy or modify any Mirage code.

Temporary

This mirrors the guard in Mirage PR #212 ( Once qwbarch merges it and releases upstream, this mod is no longer needed and will be deprecated — just uninstall it then.

All credit for Mirage goes to qwbarch. This is an independent, interoperating patch published with qwbarch's blessing.

— AzureCore

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPackqwbarch-Mirage

File & checksum

Filename
MirageNullPrefabFix-1.0.2.zip
File size
9.7 KiB
SHA-256
b90e694e408dd053b898bb9861e0738e77b14fda69cf80248f0698306879257d
Stored at
2026-10-10 06:27