Skip to content

Recommended Practices and Pitfalls

JaThePlayer edited this page Apr 23, 2025 · 13 revisions

Known Issues

These are some code features and techniques that may seem useful for code mods, but that can cause various issues if used (usually related to cross-platform compatibility).

This is a hacky way to call a "base base method", for use in override methods where skipping the direct base. method call is desired. (f.e. when inheriting from a vanilla class).
This crashes on MacOS for unknown reasons.

The recommended practice is to make use of the MonoModLinkTo attribute as shown here 🔗

DynamicData 🔗 on struct 🔗 with getters

Creating a DynamicData instance with a struct containing getters/properties will throw a System.InvalidProgramException on mono, this might be a MonoMod bug 🔗.

Until it gets fixed, you need to use reflection 🔗 to access the members.

Just Don't Use Them™

Clone this wiki locally