0 votes

I am trying to close a Node2d based dialog by hiding it via touch screen button (which is a child of this dialog via another Node2d). I use the following code:

func onSettingsOKreleased():
if GlobalScript.playEffects:
$SettingsOKButtonSound.stream = positiveSound
$SettingsOKButtonSound.play()
settingsOKButtonLight.enabled = false
settingsOKButtonLightBlob.visible = false
var settingsDialog = get
tree().getnodesin_group("SettingsDialog")[0]
if (settingsDialog.visible == true):
settingsDialog.visible = false

when this code is executed I get 4 error messages of the same kind:
E 0:00:40.730 input: Condition "!isvisibleintree()" is true.
<C++-Quellcode>scene/2d/touchscreenbutton.cpp:201 @ _input()

Code still works but i would like to get rid of the annoying messages.
Is there any solution?

in Engine by (12 points)

Please log in or register to answer this question.

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 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 webmaster@godotengine.org with your username.

Categories