You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jan Bureš edited this page Jan 24, 2024
·
12 revisions
To add your fix, please make a pull request to the dev branch with your changes and an updated README.md with your fix description and attribution.
Fix class format
To make a new fix, put your class into the CommunityFixes.Fix.<YourFixName> namespace. You have to extend the provided convenience base class CommunityFixes.Fix.BaseFix, which allows you to utilize MonoBehavior life cycle methods like Update(), etc. The base class also provides a Harmony instance HarmonyInstance, a Logger instance and the BindConfigValue method to easily add configuration. Your fix class needs to have the CommunityFixes.Fix.FixAttribute attribute which contains a user-readable name/short description of the fix:
[Fix("My first fix")]publicclassMyFirstFix:BaseFix{ ...}
When extending the BaseFix class, a default empty implementation of the OnInitialized() method is provided which you can override.
If your fix utilizes Harmony patches, you can register them in your OnInitialized() override method like this: