When you create a latent function in C++ with the FLatentActionInfo first it will incorrectly set up the linkage for the latent info such that it gets linked to the incoming execution pin of the function node rather than the output execution pin. This means whenever the latent action completes it will call the original function again, re-adding it to the LatentActionManager in an infinite loop.
#include "Kismet/KismetSystemLibrary.h"
UFUNCTION(BlueprintCallable, category = Test, meta = (Latent, LatentInfo = "LatentInfo")) void Latent_NoArgs(FLatentActionInfo LatentInfo) { UE_LOG(LogTemp, Warning, TEXT("Latent_NoArgs called")); UKismetSystemLibrary::Delay(this, 1.f, LatentInfo); }; UFUNCTION(BlueprintCallable, category = Test, meta = (Latent, LatentInfo = "LatentInfo")) void Latent_OtherArgsLast(FLatentActionInfo LatentInfo, int A) { UE_LOG(LogTemp, Warning, TEXT("Latent_OtherArgsLast called")); UKismetSystemLibrary::Delay(this, 1.f, LatentInfo); }; UFUNCTION(BlueprintCallable, category = Test, meta = (Latent, LatentInfo = "LatentInfo")) void Latent_OtherArgsFirst (int A, FLatentActionInfo LatentInfo) { UE_LOG(LogTemp, Warning, TEXT("Latent_OtherArgsFirst called")); UKismetSystemLibrary::Delay(this, 1.f, LatentInfo); };
How does TextureRenderTarget2D get TArray<uint8> type data?
How do I set a material as a post-processing material?
Why does the REMOVE method of map container remove elements have memory leaks?
How to delete some elements correctly when deleting an array loop?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
How does TArray loop correctly remove elements in blueprints?
How would I go about lerping the rotation instead of it snapping when turning (pls dont sue me epic)
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-159823 in the post.
1 |
Component | UE - Gameplay - Blueprint Compiler |
---|---|
Affects Versions | 5.0.2 |
Target Fix | 5.1 |
Created | Jul 18, 2022 |
---|---|
Resolved | Sep 28, 2022 |
Updated | Oct 21, 2022 |