I am trying to make an inventory, and each item slot is a scene made up like this.
Button
-TextureRect (Icon)
-Label
In the Button.gd, I made a gdscript export, where I just drag in a gdscript file with all the information for the item. The button then instances the script, reads the properties and changes the Label and texturerect accordingly.
In the item slot scene, dragging in the item scripts updates the button icon and label perfectly, but when I add the scene to a gridContainer, it gets messed up.
The first item in the containers icon and label are invisible, and all the items after that are completely invisible. This only happens when I change the texture of the textureRect, as commenting out that part doesn't mess it up.
Without changing texture:

https://imgur.com/xCaizOa
After changing texture:

https://imgur.com/4GdNmgd
Can someone please help?