예제 #1
0
 private static void OnSubsystemDeinitialize(IntPtr address)
 {
     try
     {
         USubsystem obj = GCHelper.Find <USubsystem>(address);
         obj?.Deinitialize();
     }
     catch (Exception e)
     {
         LogCallbackException(nameof(OnSubsystemDeinitialize), e);
     }
 }
예제 #2
0
        private static void OnSubsystemInitialize(IntPtr address, IntPtr collectionAddress)
        {
            try
            {
                USubsystem obj = GCHelper.Find <USubsystem>(address);

                if (obj != null)
                {
                    FSubsystemCollection subsystemCollection = new FSubsystemCollection(collectionAddress);
                    obj.Initialize(subsystemCollection);
                }
            }
            catch (Exception e)
            {
                LogCallbackException(nameof(OnSubsystemInitialize), e);
            }
        }
예제 #3
0
        private static bool OnSubsystemShouldCreateSubsystem(IntPtr address, IntPtr otherAddress)
        {
            try
            {
                USubsystem obj      = GCHelper.Find <USubsystem>(address);
                UObject    otherObj = GCHelper.Find <UObject>(otherAddress);

                if (obj != null)
                {
                    return(obj.ShouldCreateSubsystem(otherObj));
                }
            }
            catch (Exception e)
            {
                LogCallbackException(nameof(OnSubsystemShouldCreateSubsystem), e);
            }

            return(false);
        }