How to pass value to or call a function of AMyPlayerController (APlayerController) from UMenuWidget (UUserWidget) in Unreal, using C++?

109 views Asked by At

My UMenuWidget (derived from UUserWidget) needs to pass a value to AMyPlayerController (derived from APlayerController).

I have tried:

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FPassParam,int,intData);

But inGameHUD->MenuWidget from AMyPlayerController::BeginPlay() returns NULL, likely because MenuWidget is yet to be created.
This prevents me from add/bind-ing of functions.

How can I do/solve this?

Kindly help me, please.
Thank you.

1

There are 1 answers

0
Supreeto On BEST ANSWER