MaterialAssetRestorerCore

v2.0.0·Updated 2026-08-01

API that lets moon/interior devs use some of the vanilla materials that get broken during ripping game files into Unity.

Screenshots 2 screenshots

About this mod Author’s original text

MaterialAssetRestorerCore

Moon and interior devs are likely familiar with how poorly the certain assets rip when trying to design their levels. I made this tool to attempt to restore some at runtime. It can access materials both from within the vanilla prefabs and scenes. (My thread in the LC Modding Discord)

This mod works by searching through a moon after it is loaded to replace the broken ones from modded moons/interiors with the corresponding one from vanilla. API specs and example useage below.

NOTE: IN ORDER TO ACCESS VANILLA MATERIALS FROM SCENES, THEY ARE BRIEFLY LOADED DURING StartOfRound. FROM MY TESTING THIS DID NOT CAUSE MAJOR PERMANENT ISSUES.

API Docs For Devs

Create a json file (or multiple) with the format and in the direcotry shown below. Each json contains a list of MaterialSets. A MaterialSet is made up of a BaseMaterial, which is the name of the material in the vanilla game, and a ReplaceMaterial, which is the name of the material in your mod. Often these will likely be the same name, but they don't have to be. You must also specify either a PrefabName or a SceneName so that this tool knows where to look to find the BaseMaterial.

Additionally, the fields MaterialSource and MaterialDestination may be supplied but are optional. They accept the following options: Renderer (default if field ommitted), TerrainDetails, ParticleSystem and VFX (VFX must pair with VFX and is based on what is set in the visual effect component's "Asset Template" field in the Unity editor). The source and destination type is used to specify what type of thing you are attempting to pull out of and replace into, respectively.

{

"MaterialSets": [

{

"BaseMaterial": "gamematerial",

"ReplaceMaterial": "yourmaterial",

"PrefabName": "gameprefab",

"MaterialSource": "Renderer",

"MaterialDestination": "Renderer"

},

{

"BaseMaterial": "gamematerial",

"ReplaceMaterial": "yourmaterial",

"SceneName": "gamescene",

"MaterialSource": "ParticleSystem",

"MaterialDestination": "ParticleSystem"

}

]

}

Project Heirarchy (NOTE: YOU MUST PLACE THE JSON FILE IN THE plugins/MaterialReplacements/ FOLDER FOR THIS TO WORK):

YourMod/

├── plugins/

│ └── MaterialReplacements/

| └── YourJSON.json

├── README.md

├── manifest.json

├── icon.png

├── CHANGELOG.md (optional)

└── LICENSE.md (optional)

Example Usecase

WaterAssetRestorer

Before

After

Credits

  • The developers of this mod's dependencies as it literally could not exist without them.
  • Audio Knight on YouTube for a handy starting tutorial.
  • Nomnomab's project patcher to access vanilla LC through Unity.
  • Those that helped provide information on the modding Discord, mainly through the Dev-general channel on Discord.
  • Debugging tools like Imperium and UnityExplorer.
  • Xilophor's modding template for a handy way to start.
  • for hosting this mod as I wouldn't know how to distribute without it.

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:

xilophor-LethalNetworkAPI

File & checksum

Filename
MaterialAssetRestorerCore-2.0.0.zip
File size
37.9 KiB