Example #1
0
        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);
            }
        }
Example #2
0
        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);
            }
        }