SOLVED!
I saved both the awake and asleep textures as .tres files and rewrote the code to have a single TextureRect use the .tres files.
View the full code on Pastebin: https://pastebin.com/h6W7jGcn
VERSION: v4.2.stable.official [46dc27791]
I am trying to have an escape block with 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.
Here’s my code for the escape blocks: https://pastebin.com/5dsGG8Jx
Here’s some screenshots of my scene docks (can also be seen in the post): https://imgur.com/a/FwvzT9n
Here’s a short video I uploaded of my running game: https://drive.google.com/file/d/1Fm4vstHj9SinjvGEfj8coCYpjC3uS3xj/view?usp=sharing
0 comments