我正在为Unity游戏解钩创建一个mod。有什么方法可以知道何时调用特定方法,以便我可以在完成时调用我的方法,而不是调用它?例如:
//This is the external method i want to intercept
public void OnPlayerJoin()
{
Chat.WriteLine(NewPlayer.name + "has joined the game!");
}
//And here is my method that i want to call instead of it in process of interception
public void PlayerJoinHook()
{
Chat.WriteLine(NewPlayer.name + "has joined the server! Don't forget to read rules!");
}