Developer Notes

This issue has been closed as 'Won't Fix' due to an extended period of time without updates. If this issue is important to you please let us know by posting on the AnswerHub or UDN, and Epic will re-open the ticket for further review.

Description

If a code function is written with a delay that doesn't take any arguments, calling the function from blueprints causes the blueprint to get stuck in a loop and not continue to the next BP node.

Steps to Reproduce
  1. Open UE4 Editor (Any Project)
  2. Add code to project based on Game Mode (LatentTestGameMode)
  3. Add the following to LatentTestGameMode.h
     public:
         UFUNCTION(BlueprintCallable, meta=(Latent, LatentInfo="LatentInfo"), Category="Test")
         void LatentFunctionNoArgs(FLatentActionInfo LatentInfo);
     
         UFUNCTION(BlueprintCallable, meta=(Latent, LatentInfo="LatentInfo"), Category="Test")
         void LatentFunctionWithArgs(float Dummy, FLatentActionInfo LatentInfo);
    
  4. Add the following to LatentTestGameMode.cpp
    void ALatentTestGameMode::LatentFunctionNoArgs(FLatentActionInfo LatentInfo)
     {
         UKismetSystemLibrary::Delay(this, 1.0f, LatentInfo);
     }
     
     void ALatentTestGameMode::LatentFunctionWithArgs(float Dummy, FLatentActionInfo LatentInfo)
     {
         UKismetSystemLibrary::Delay(this, 1.0f, LatentInfo);
     }
    
  5. Compile
  6. In the editor create a blueprint based on LatentTestGameMode (MyGMBP)
  7. Set up event graph of MyGMBP to match attached screenshot
  8. In World Settings,set MyGMBP as the Game Mode override
  9. PIE

Result:
The print node wired into "No Args" does not print at all. The "With Args" print node does print as expected.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

19
Login to Vote

Won't Fix
ComponentUE - Gameplay - Blueprint
Affects Versions4.9.2
CreatedOct 19, 2015
ResolvedMar 26, 2018
UpdatedSep 27, 2022