CARD Game card setup help!!

okay so i am attempting to make my own type of card game but im running into a problem with setting up the cards them selves and im not crazy experienced yet so i decided to ask yall, so my dilema is should i make the cards a widget of some kind like i have currently as buttons ( not gonna lie not at all sure if that would even work its just one of the options i have come up with so far) or my other idea is making the cards a actor of some kind individually but then how do i get them onto the widget which again brings me back to having a problem! if any of u guys have any ideas that would be greatly appreciated!

Yes, I would create a single card widget that you can populate with the card data for each card that you want to bring into the game. You could store those instances in an array so that you can manage all of the active cards easily.

You would then add each instance of those cards to the viewport (Add to Viewport) You can then add card widgets as children of whichever part of the UI you want to place them.

In my opinion, I would do a combination of both.

If I was doing something like this I would make my cards an actor. That actor would have a “Widget Component” on it. That widget component would refer to the Widget asset that represents the card face.

That way I can use widgets to layout the card faces while keeping the nice feeling of the cards being actors in the scene.

In your second picture, change your “Plane” component to a “Widget Component” and then point that widget component at the card widget you created in the first picture.

You’ll probably have to adjust some settings and scale on the widget component to size it properly and look right, but that’s just tweaking some component properties.

Good luck!