As the title says. I'm trying to load a sprite programtically and using prints I've deduced it's in the right spot but I do not see the sprite. According to the position it says it's at when I ask it to print the art's global position it should be in the middle of the screen but it is not. If there's any other information I can provide please lmk!
#Sprite Texture loaded programmatically does not show.
18 messages · Page 1 of 1 (latest)
Hm, that's weird, can you show the local/remote node placement when the texture is added? I want to see it's position in the tree @young lily
Sorry I'm not sure I'm following
The Node and Sprite objects are created at runtime it was my understanding that objects created at runtime don't show up in the tree
But here's my whole tree if that's what you need?
Is it maybe because I never add that card object to as a child of the whole tree it's like freestanding or something?
not explaining myself well
Yea, i just noticed you are calling add_child from the card variable not the scene itself
I wonder if I just slap it as a child of the Card Spot if that'll resolve it let me try that
It can be, or it can be size problem of the png, maybe too small or not
Yes i think that can solve it
Ok yeah that was it
Yea, you just needed to add the card variable to the script itself in the end like :
Card.add_child(whatev)
Add_child(card)
mhm, did that and it worked
Cool
tysm!
Not a problem
Just make sure to add the solved tag for this post