This is a ThunderKit Built project that enables access to RoR2's shaders through a stubbed version, and tools for converting any stubbed shader in an asset bundle or object into Hopoo equivalents.
If you want to print debug information, each method has a debug
parameter that you can enable. Please set debug
to false before you release your mod!
- Install StubbedShaderConverter as a mod from Thunderstore. Reference this mod's dll within your project.
- If using ThunderKit, make sure to add StubbedShaderConverter through ThunderKit's Plugin Manager within Unity.
- Extract the folder from the .zip within the mod and import the StubbedShaders folder into your unity project. This will allow you to set your material shaders to stubbed hopoo versions.
- Edit the properties of your material to desired values.
- Within the code of your mod:
- Make sure your mod has
[BepInDependency("com.valex.ShaderConverter", BepInDependency.DependencyFlags.HardDependency)]
in your mod's BaseUnityPlugin script. - Make sure you are
using StubbedConverter;
. - Within your mod's
Awake()
, useShaderConverter.ConvertStubbedShaders()
and plug in your AssetBundle.
- Make sure your mod has
- Done!
This is a tool that can be used with Twiner's RuntimeInspector to control/customise materials in-game. This is extremely useful in getting the exact settings you want/need for materials.
- Make sure you are
using StubbedConverter;
- Call
MaterialController.AddMaterialController
and plug in the specificGameObject
you want to customise the materials of.- If you are usingThunderKit, you can attach the
AddMaterialController
component to the desiredGameObject
.
- If you are usingThunderKit, you can attach the
- In-game, open RuntimeInspector.
- Select your GameObject in the heirarchy view on the left window.
- Select the relevant Renderer GameObject, which now has a
Controller Component
to edit the material's shaders. - Apply resulting shader properties to the material within your unity project!