YogevNa
(YogevNa)
September 22, 2018, 11:29pm
1
Using 4.20.3
While coding in my** Game Instance** class and exposing functions to blueprint I encountered the following…
No matter what i do when assigning “ExpandEnumAsExecs ” and “Latent ” metadate to UFUNCTION the execution pins not firing.
Is that a feature or a bug?
My function declaration:
They are firing when I use this:
UFUNCTION(BlueprintCallable, Category = "MyFunctions", meta = (ToolTip = "MyToolTip", ExpandEnumAsExecs = "Branches"))
void MyFunction(bool bSomeVar, int32 AnotherVar, EStatusEnum& Branches);
They are NOT firing when I use this:
UFUNCTION(BlueprintCallable, Category = "MyFunctions", meta = (ToolTip = "MyToolTip", ExpandEnumAsExecs = "Branches", Latent))
void MyFunction(bool bSomeVar, int32 AnotherVar, EStatusEnum& Branches);
My EStatusEnum is:
UENUM(BlueprintType)
enum class EStatusEnum : uint8
{
OnSuccess,
OnFail
};
Help will be appreciated, thanks.
BFG2k
(BFG2k)
May 24, 2021, 1:53pm
2
Had same issue, but found out I added forward-declaration of enum. Declaring enum before function solved this.
I wasn’t sure that should even work, but found a few engine examples so that’s pretty amazing.
I think what you’re missing is some additional markup and a function param.
UFUNCTION( BlueprintCallable, meta = (Latent, LatentInfo = ActionInfo, WorldContext = WorldContextObject, DisplayName = "Finish Visualization")
void FinishVisualization_BP( UObject* WorldContextObject, FLatentActionInfo ActionInfo, bool WaitOnChildVisualizations = true );
Notice the LatentInfo meta-property and the FLatentActionInfo function parameter. You’ll probably need the WorldContext parameter as well. There’s a bit more setup required to get a working latent node than just marking it up.
sivan
(sivan)
May 27, 2021, 8:49am
4
hey, can you provide a sample code of the function how to use the FLatentActionInfo ActionInfo struct? it is quite an interesting stuff, I was able to create latent Bp nodes only by callbackproxy
STRiFE.x
(STRiFE)
May 27, 2021, 11:46am
5
1 Like