Dynamic Orientation doesn't keep gui changes from code (solved)

I have everything working fine when I switch from Landscape to portrait except in code I set things in the GUI like game mode. So if they select casual I change the text from “game mode” to “casual” or challenge, or timed…which ever mode they chose But if they switch the orientation it goes back to the original default “game mode” text.

Is this supposed to be like this? Do I really need to reset all my gui text labels when they rotate the screen?

See on start it is “casual”


But in portrait mode it switches back to default text “game mode”

Yes, when the orientation changes you need to set texts and update other node state.

Thank you. To me that’s odd to require that, but it is what it is.

Hi guys,
I’ve noticed the same behaviour when my pause menu is open in portrait, and then suddenly disappears when I switch to landscape (node is disabled by default in the editor).
I’m trying to create a very similar game.
I admit I got the idea from Poki, the game’s name is Cats Drop, congrats for it @yeqwep, very cool game.
@yeqwep I’m tagging you because I’ve checked your game after discovering this issue, and it also suffers from the same… menu disappears on orientation change.
@schlista Have you released the game on some web portal too?

1 Like

Kabocha Game by Kabocha Games (itch.io)

BTW: You have to set all the nodes when orientation changes. Basically it goes back to defaults.

3 Likes

Thank you for playing. I have understood “Enabled” goes back to defaults too.