I’m learning Unreal and I can’t seem to figure this out. How do I set/constrain/define the size of a widget (text/image/etc) on an actor?
I have an actor (a card for a card game), which are the orange rectangles on the bottom row (your hand of cards). I’m dragging and dropping them onto the board. Which is great. But now I’m trying to add graphics and text to the cards, and am struggling to learn how to do this properly.
I created Widget Blueprint, added a Canvas Panel, and added my widget to my Card Actor. It didn’t show up at first, but once wrapped the Canvas Panel with a retainer box, then it showed up. Should I always wrap the canvas panel with a retainer box for it to show up?
Here is the main problem. I’m trying to fit text and images onto the card, and have them show up and look normal on the card actor in the game. But everytime I put text/images on the widget, the positioning is not what is expected. I discovered Size Boxes and have been playing around with them, but it’s been a nightmare trying to get the size correct. Do I add a size box as a child to the canvas panel? Or wrap the canvas panel with a size box? I’ve tried one, the other, both, etc.
Here is the format I’m going for. I want it to look like a playing card, where you have a main graphic, a name on the bottom, and a few numbers in the corners. But I don’t know how to set the size/constraints of the widget in order to achieve this.
Here is the current screwed up form of my widget and card lol
The size box seems to only apply to the image. So I tried wrapping a size box around the canvas panel, no idea if that’s the right thing to do. But regardless, i have to guess and check on sizes when it comes to the actor. It’s a totally mess. Can’t I just specify a size and have it fill to that size?
Thanks