Harmony

Harmony 2

Introduction

Harmony lets you change .NET methods at runtime, without editing DLL files.

It supports Mono and .NET environments on Windows, Unix and macOS except when Unity uses the stripped down NetStandard profile (.NET 4.x profile works fine). Harmony is used in mainstream Unity games and many other applications.

It combines patches from multiple mods on the same method. Andreas Pardeike originally created it for RimWorld and its modding community.

Enjoy! /Andreas Pardeike

Getting Started

Use Lib.Harmony for a single DLL with dependencies merged in. This is the recommended package.

Use Lib.Harmony.Thin if you want to manage dependencies yourself. Make sure they are available at runtime.

Documentation

Start with the guide and examples, or browse the API reference.

Found an error or have feedback?

  • fork the repository and create a pull request
  • file a documentation Issue on the repo
  • or write about it on the official discord

New to modding and C#? Alongside the language basics, learn about reflection.

Community

Questions? Join the Discord server or file a GitHub issue.

Help by promoting this library so other developers can find it. One way is to upvote this stackoverflow answer. Or spread the word in your developer communities. Thank you!

Contact

Andreas Pardeike [email protected] twitter: @pardeike

Donations

Donations keep me going: https://www.patreon.com/pardeike

  • Edit this page
In this article
Back to top Generated by DocFX