Extending UUserWidget

Hi all!

I’m extending UUserWidget to add some helper methods (I was previously building those in the Editor, but they are way easier to express in code).

For instance:

protected:
UFUNCTION(BlueprintCallable, Category = "HUD")
bool SelectPower(const int Power) const;

For some reason, when editing a BP based on this class, this UFUNCTION doesn’t have exec pins:

325182-screenshot-2020-12-18-234017.png

What am I doing wrong?

A few moments later I realized something… UE is (correctly, of course) looking at the const marker in the function and concluding that, if it’s const, then there are no side effects and, therefore, no need for a exec pin.

I thought that this was never inferred instead extracted from the BlueprintCallable vs BlueprintPure.

Well, live and learn.