BepisResoniteWrapper
Common hooks and events library for BepInEx Resonite mods. Provides essential events like OnEngineReady to simplify mod development.
| Last updated | 3 weeks ago |
| Total downloads | 239 |
| Total rating | 0 |
| Categories | Libraries |
| Dependency string | ResoniteModding-BepisResoniteWrapper-1.0.1 |
| Dependants | 11 other packages depend on this package |
This mod requires the following mods to function
ResoniteModding-BepisLoader
A mod loader which allows using BepInEx with Resonite
Preferred version: 1.5.0README
BepisResoniteWrapper
A Resonite BepInEx library (not a standalone mod) that provides commonly-used hooks and events for other BepInEx mods. This library simplifies mod development by offering ready-to-use events like OnEngineReady.
Installation (Manual)
- Install BepisLoader for Resonite.
- Download the latest release ZIP file (e.g.,
ResoniteModding-BepisResoniteWrapper-1.0.0.zip) from the Releases page. - Extract the ZIP and copy the
pluginsfolder to your BepInEx folder in your Resonite installation directory:- Default location:
C:\Program Files (x86)\Steam\steamapps\common\Resonite\BepInEx\
- Default location:
- Start the game. If you want to verify that the mod is working you can check your BepInEx logs.
Usage for Developers
Adding BepisResoniteWrapper to Your Mod
- Add the NuGet package reference to your mod's
.csprojfile:
<PackageReference Include="ResoniteModding.BepisResoniteWrapper" Version="1.0.*" />
- Add it as a dependency in your
thunderstore.toml:
[package.dependencies]
ResoniteModding-BepisResoniteWrapper = "1.0.0"
Using the Events
Subscribe to events in your BepInEx plugin:
using BepisResoniteWrapper;
public class MyMod : BasePlugin
{
public override void Load()
{
// Subscribe to the OnEngineReady event
ResoniteHooks.OnEngineReady += OnEngineReady;
}
private void OnEngineReady()
{
// The Resonite engine is now fully initialized
// Safe to access FrooxEngine classes and functionality
Log.LogInfo("Engine is ready with version: " + Engine.Current.VersionString);
}
}
Available Events
OnEngineReady- Fired when the Resonite engine has finished.- No parameters - the engine instance can be accessed via
Engine.Current
- No parameters - the engine instance can be accessed via
For Library Contributors
To add new hooks to this library:
- Create a new hook class in the
BepisResoniteWrapper/Hooks/folder - Add the corresponding event to the
ResoniteHooksclass inApi.cs - Follow the pattern used in
EngineReadyHook.cs:- Use
[HarmonyPatchCategory]attribute for organization - Use
[HarmonyPatch]to target the method to hook - Implement Prefix/Postfix methods as needed
- Call the appropriate event from
ResoniteHooks
- Use