Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | DriNeo | |
Old Version | Published before Godot 3 was released. |
Hi, I’m currently implementing a pause menu to pop during game execution.
I have two easy solutions.
-Instancing a scene who contains the pause panel.
-using show().
show() and hide() activate or deactivate the controls and it’s probably faster because the nodes of the pause menu stays available into memory. But I could forgot something.
What is your opinion ?
You can instance the scene and keep it in a variable (on the current scene or a global), then add it to the tree when pausing the rest and remove from the tree when closing the pause window, keeping the instance.
eons | 2016-12-12 19:06
Your solution seems cleaner to me. Using remove_child() and add_child() works fine.
My PC is too fast to evaluate the lag when I hit pause button. I will see this when I will export the game to my old Android phone.
Thank you, you can change your comment to an answer if you want.
Sorry if my english is not very good
DriNeo | 2016-12-12 20:22