public static RedirectCalls ( |
||
from | ||
to | ||
return |
public override void UpdateData(SimulationManager.UpdateMode mode) { // Call EventUpdateDataPre?.Invoke(mode); EventUpdateData?.Invoke(mode); EventUpdateDataPost?.Invoke(mode); // Execute original method RedirectionHelper.RevertRedirect(_RenderManager_UpdateData_original, _RenderManager_UpdateData_state); RenderManager.instance.UpdateData(mode); RedirectionHelper.RedirectCalls(_RenderManager_UpdateData_original, _RenderManager_UpdateData_detour); }
public static void Deploy() { if (deployed) { return; } _RenderManager_UpdateData_original = typeof(RenderManager).GetMethod("UpdateData", BindingFlags.Instance | BindingFlags.Public); _RenderManager_UpdateData_detour = typeof(RenderManagerDetour).GetMethod("UpdateData", BindingFlags.Instance | BindingFlags.Public); _RenderManager_UpdateData_state = RedirectionHelper.RedirectCalls(_RenderManager_UpdateData_original, _RenderManager_UpdateData_detour); deployed = true; }