How to Contract UMG Border widget
In our game, when the crosshairs point at an NPC or vehicle, a health bar and other information is displayed. The 5 kinds of information that is displayed are each stored in a Horizontal Text box and then if applicable, these are added to Vertical Text Box that is a child of a Border. The border correctly "Sizes to Content" when the particular health bar is displayed, and grows if the next AI has more objects in their health bar (e.g., one may have just health, another may have health and armor, and yet another may have health, armor and shield).
The border does not shrink back down from whatever maximum size it's expanded to, it remains at the largest size it's expanded to. How do I get the border to go back to it's original size on each new AI that is targeted?
Though blueprint is preferred in this one case, a C++ solution would be acceptable as I do have an extended UMG Class for the HUD currently doing nothing.
Edit: This problem still exists for us on 4.19. Can this be considered a bug or is it considered expected functionality. It seems the box should shrink to it's content? I'm adding "bug report" in this edit to hopefully get some information from devs. Thanks.
Follow this question
Once you sign in you will be able to subscribe for any updates here