[Solved] Buttons break when in GridContainer?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By dugtrioramen

I am trying to make an inventory, and each item slot is a scene made up like this.

-TextureRect (Icon)

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:
enter image description here

After changing texture:
enter image description here

Can someone please help?

:bust_in_silhouette: Reply From: dugtrioramen

It was a problem with shaders. I had been using an outline shader on the textureRect, and it was not local to scene.