Browse documentation

Class HarmonyUncheckedReferenceBinding

Namespace
HarmonyLib
Assembly
0Harmony.dll

Skip reference-type compatibility checks for one patch callback, including references produced by boxing.

[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public sealed class HarmonyUncheckedReferenceBinding : HarmonyAttribute
Inheritance
object
Attribute
HarmonyUncheckedReferenceBinding
Inherited Members

Remarks

This does not add conversions or disable storage, value/address, or existing role-specific requirements. Transpilers reject it.

Constructors

HarmonyUncheckedReferenceBinding(bool)

Enable or disable unchecked reference binding for this callback or patch factory.

public HarmonyUncheckedReferenceBinding(bool enabled = true)

Parameters

enabled bool

Whether to skip reference-type compatibility checks.

Harmony 3

For Harmony 2, read the 2.x documentation.