I am trying to have an escape block with a TextureRect that has two different textures–an animated one where it’s awake and an inanimate one where it’s asleep. The textures for my escape blocks display properly sometimes and appear as a blank white texture other times (i.e. when leaving and reentering the scene). I have tried rewriting my code and using different methods and nodes to swap out the escape block textures, but all of them result in the white texture appearing at least some of the time.
Can anyone help me figure out what I’m doing wrong or link me to an answer for reference? I’ve looked around but couldn’t find anything.
The textures still fail to load. Looks like it has nothing to do with the code failing to swap out the sprites, but rather the textures themselves not loading.
EDIT 2: I tried rewriting the escape block code to use the wake and sleep textures directly rather than applying them to a single texture: