ReturnFlow Enum
Definition
Section titled “Definition”Specifies how the return value affects control flow.
public enum ReturnFlowRemarks
Section titled “Remarks”WARNING: Modifying the control flow of a method in a hook should NOT be done if you are copy pasting logic from the original method. This will destroy compatibility with ILHooks applied to the target method. In such a case, ALWAYS use an ILHookDetour to modify the CIL instructions of the method directly.
To learn more about ILHooking, see https://monodetour.github.io/ilhooking/introduction/
Fields
Section titled “Fields”Signifies that this return value doesn’t affect control flow.
None = 0SkipOriginal
Section titled “SkipOriginal”Skips the original method body, but doesn’t skip prefixes and postfixes written to it.
This is essentially the same as prefix return false in HarmonyX.
SkipOriginal = 1Remarks
Section titled “Remarks”WARNING: Modifying the control flow of a method in a hook should NOT be done if you are copy pasting logic from the original method. This will destroy compatibility with ILHooks applied to the target method. In such a case, ALWAYS use an ILHookDetour to modify the CIL instructions of the method directly.
To learn more about ILHooking, see https://monodetour.github.io/ilhooking/introduction/
HardReturn
Section titled “HardReturn”Returns immediately and doesn’t run any hooks written to the method.
HardReturn = 2Remarks
Section titled “Remarks”WARNING: Modifying the control flow of a method in a hook should NOT be done if you are copy pasting logic from the original method. This will destroy compatibility with ILHooks applied to the target method. In such a case, ALWAYS use an ILHookDetour to modify the CIL instructions of the method directly.
To learn more about ILHooking, see https://monodetour.github.io/ilhooking/introduction/