How to create a hook
Creating a hook (with code snippets)
What is a hook?
wrapMethod
@wrapMethod(YourWrappingTarget)
protected cb func OnSomethingHappens(originalEventParam: ref<SomeRef>) -> Bool {
wrappedMethod(originalEventParam);
// do stuff here
}replaceMethod
@replaceMethod(YourWrappingTarget)
protected cb func OnSomethingHappens(originalEventParam: ref<SomeRef>) -> Bool {
return false;
}Things to hook
Example

Last updated
Was this helpful?