Now, I use this function to update a TextBlock which indicates the Pickup taken (is it a weapon, a shells pack or anything like that).
So for example, if I pickup a Pistol the TextBlock text will be “Pistol”.
The problem is that I want to call the ChangeText function inside my FirstPersonCharacter.cpp, BECAUSE IT’S THERE that I have the AddWeapon(), AddHealth(), AddArmor() function.
's solution is spot on.
If you want complete control from the FirstPersonCharacter.cpp, you can instantiate the widget C++ base class from the FirstPersonCharacter with a this-pointer as outer. That way you always have a reference to your widget and can call whichever functions you open up.