Hello, so i have a Widget Blueprint and a HUD Blueprint, with the HUD Blueprint creating an instance of the Widget Blueprint and adding it to the viewport. When creating the Widget Blueprint, i expose a Player Variable to be set by the HUD Blueprint.
The Player variable is correctly set in the Widget Blueprint, as shown.
When I use the Player variable that is set in the Widget Blueprint, as shown.
This does not work, and the Player variable contains wrong information, not relating to the currently active FSPlayer in the scene.
When I use the Player variable that is set in the HUD from the Widget, as shown.
It works just fine, and am able to get the correct update information at runtime.
Here is some Print String’s to give an example of the problem at hand.
The HUD is printing, its version of the Player’s Health, while the Widget is printing its version of the Player variable’s health.
As you can see the Widget Blueprint’s player is not being updated(cause 5 Health is the default value for health, and the max health is 6) after taking damage,
While the HUD’s player is being updated just fine.
Is there a reason that my Player variable in the Widget Blueprint is not updating/getting set correctly, compared to my HUD’s variable which is getting directly passed into the Widget Blueprint on creation?