How to cast from Level blueprint to UMG


Hello and thanks for reading this in advance. so the issue im having is that i want to display a number (DeathCount) that is made in Level Blueprint in the UMG i made called HUD. however whenever i cast it, it always fails on both ends what am i doing wrong. or is any of this correct and how am i supposed to be doing this thanks for the help in advance.

Hello! You don’t need to cast to UMG_HUD. If you want to set your CastedFromLVLBlueprint and show the HUD on a screen, you should CreateWidget of your UMG_HUD class. Result will be a UserWidget, so then you can set your variable and AddToVieport UserWidget.
For more information you can look at descriptions of this metods:

Create Widget

Add to Viewport