I solved it!!


So in my last devlog I encountered a problem: I couldn't change a sprite's SpriteFrames. I was able to solve that now! And the solution is so easy... I wanna slap myself! 

Just move this node...


... to the bottom:


So what I didn't know is: The order in the scene hierarchy matters for the scripts attached to them. Scenes that are on the top are loaded first! That means the MoguMogu script (where I load the SpriteFrame resource) wasn't ready yet when I called it from the TimeManager script... so dumb!! 

Was super unsure if my approach with changing the SpriteFrames was even right so I researched and found others who did it the same way:

All good... they explained it really well too!

Full cycle of life(egg to death) works now.

Leave a comment

Log in with itch.io to leave a comment.