I have this function that instantiates an object and assigns its value based on a resource:
When I press the deal cards button, it adds the object to the scene tree and assigns the correct properties, but the object is not visible in game. This is what my scene tree looks like:
It’s adding the card and reparenting it correctly and assigning the proper values according to the inspector and the print statements, but it’s just not showing up in the game. I’ve tried changing the z index and toggling z as relative and all that and it’s just not showing up. I’m kind of at a loss.
I found a workaround that I think will work. Before, my
card_temp object was a node2D. I changed it to a button (the cards are going to need to be clickable anyway) and it worked. They show up in the game window and are clickable. I’m not used to working with control nodes and I don’t quite understand anchors and layouts so I’ll have to read up on that, but I did at least get something that works now. Thanks for your help (and your patience!)