private static void OnActorComponentBeginPlay(IntPtr address) { UObject obj = GCHelper.Find(address); IntPtr original = actorComponentBeginPlay.GetOriginal(obj); Native_VTableHacks.CallOriginal_ActorComponentBeginPlay(original, address); obj.BeginPlayInternal(); }
private static void OnSetupPlayerInputComponent(IntPtr address, IntPtr inputComponentAddress) { UObject obj = GCHelper.Find(address); IntPtr original = setupPlayerInput.GetOriginal(obj); Native_VTableHacks.CallOriginal_SetupPlayerInputComponent(original, address, inputComponentAddress); obj.SetupPlayerInputComponent(inputComponentAddress); }
private static void OnActorEndPlay(IntPtr address, byte endPlayReason) { UObject obj = GCHelper.Find(address); IntPtr original = actorEndPlay.GetOriginal(obj); Native_VTableHacks.CallOriginal_ActorEndPlay(original, address, endPlayReason); obj.EndPlayInternal(endPlayReason); }
private static void OnActorBeginPlay(IntPtr address) { UObject obj = GCHelper.Find(address); ActorBeginPlayDel_ThisCall original = actorBeginPlay.GetOriginal <ActorBeginPlayDel_ThisCall>(obj); original(address); //Native_VTableHacks.CallOriginal_ActorBeginPlay(original, address); obj.BeginPlayInternal(); }
private static void OnActorComponentEndPlay(IntPtr address, byte endPlayReason) { UObject obj = GCHelper.Find(address); ActorComponentEndPlayDel_ThisCall original = actorComponentEndPlay.GetOriginal <ActorComponentEndPlayDel_ThisCall>(obj); original(address, endPlayReason); //Native_VTableHacks.CallOriginal_ActorComponentEndPlay(original, obj.EndPlayInternal(endPlayReason); }
private static void OnGetLifetimeReplicatedProps(IntPtr address, IntPtr arrayAddress) { UObject obj = GCHelper.Find(address); IntPtr original = repProps.GetOriginal(obj); Native_VTableHacks.CallOriginal_GetLifetimeReplicatedProps(original, address, arrayAddress); using (TArrayUnsafeRef <FLifetimeProperty> lifetimePropsUnsafe = new TArrayUnsafeRef <FLifetimeProperty>(arrayAddress)) { FLifetimePropertyCollection lifetimeProps = new FLifetimePropertyCollection(address, lifetimePropsUnsafe); obj.GetLifetimeReplicatedProps(lifetimeProps); } }
public T Resolve(FunctionRedirect functionRedirect, UObject obj) { if (cachedFunc == null) { cachedFunc = functionRedirect.GetOriginal <T>(obj); } if (cachedFunc == null) { throw new Exception("FunctionRedirect did not result in a function pointer"); } return(cachedFunc); }
private static void OnActorBeginPlay(IntPtr address) { try { UObject obj = GCHelper.Find(address); ActorBeginPlayDel_ThisCall original = actorBeginPlay.GetOriginal <ActorBeginPlayDel_ThisCall>(obj); original(address); //Native_VTableHacks.CallOriginal_ActorBeginPlay(original, address); obj.BeginPlayInternal(); } catch (Exception e) { LogCallbackException(nameof(OnActorBeginPlay), e); } }
private static void OnSetupPlayerInputComponent(IntPtr address, IntPtr inputComponentAddress) { try { UObject obj = GCHelper.Find(address); SetupPlayerInputComponentDel_ThisCall original = setupPlayerInput.GetOriginal <SetupPlayerInputComponentDel_ThisCall>(obj); original(address, inputComponentAddress); //Native_VTableHacks.CallOriginal_SetupPlayerInputComponent(original, address, inputComponentAddress); obj.SetupPlayerInputComponent(inputComponentAddress); } catch (Exception e) { LogCallbackException(nameof(OnSetupPlayerInputComponent), e); } }
private static void OnActorComponentEndPlay(IntPtr address, byte endPlayReason) { try { UObject obj = GCHelper.Find(address); ActorComponentEndPlayDel_ThisCall original = actorComponentEndPlay.GetOriginal <ActorComponentEndPlayDel_ThisCall>(obj); original(address, endPlayReason); //Native_VTableHacks.CallOriginal_ActorComponentEndPlay(original, obj.EndPlayInternal(endPlayReason); } catch (Exception e) { LogCallbackException(nameof(OnActorComponentEndPlay), e); } }
private static void OnPlayerControllerSetupInputComponent(IntPtr address) { try { UObject obj = GCHelper.Find(address); PlayerControllerSetupInputComponentDel_ThisCall original = playerControllerSetupInputComponent.GetOriginal <PlayerControllerSetupInputComponentDel_ThisCall>(obj); original(address); //Native_VTableHacks.CallOriginal_PlayerControllerSetupInputComponent(original) obj.SetupInputComponentInternal(); } catch (Exception e) { LogCallbackException(nameof(OnPlayerControllerSetupInputComponent), e); } }
private static void OnGetLifetimeReplicatedProps(IntPtr address, IntPtr arrayAddress) { try { UObject obj = GCHelper.Find(address); GetLifetimeReplicatedPropsDel_ThisCall original = repProps.GetOriginal <GetLifetimeReplicatedPropsDel_ThisCall>(obj); original(address, arrayAddress); //Native_VTableHacks.CallOriginal_GetLifetimeReplicatedProps(original, address, arrayAddress); using (TArrayUnsafeRef <FLifetimeProperty> lifetimePropsUnsafe = new TArrayUnsafeRef <FLifetimeProperty>(arrayAddress)) { FLifetimePropertyCollection lifetimeProps = new FLifetimePropertyCollection(address, lifetimePropsUnsafe); obj.GetLifetimeReplicatedProps(lifetimeProps); } } catch (Exception e) { LogCallbackException(nameof(OnGetLifetimeReplicatedProps), e); } }