This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+3 votes

Suppose we have a button in scene A. When we press this button, scene A is freed and scene B is loaded. Further suppose that scene B has a button in the same position as scene A. When pressing button in scene A multiple times, first click frees scene A and loads scene B. Remaining clicks are processed just after the scene B is loaded. That means that the button in scene B is pressed.

How to prevent this?
I know that after the first click I can show up panel (e.g. with label "loading..") that will stop all the events. But is there another way to do this? Way without placing new node to scene. Ideally is there a project or button setting that can prevent this?

in Engine by (675 points)
edited by

1 Answer

0 votes

How about setting a simple timer in scene B, say 1 second, and only after that you start processing inputs? That way it gives time for the user to understand the scene changed.

by (290 points)

Thank for the tip! I hope for some option "turn off event detection during loading new scene" :).

if its on its because the scene is already loaded, it just might not be evident to the player

OK, are you sure? When I start loading a new scene, the old scene remains "frozen" on the screen (in this time user can click the button multiple times) and after a while (it depends on complexity of the new scene) new scene appears on the screen.
So you mean that there is a delay between the time when new scene is loaded and the time when the new scene is rendered on the screen?

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.