Reddit reviews GD Script: Godot 3.1 game engine
We found 1 Reddit comments about GD Script: Godot 3.1 game engine. Here are the top ones, ranked by their Reddit score.
We found 1 Reddit comments about GD Script: Godot 3.1 game engine. Here are the top ones, ranked by their Reddit score.
hello, u/jaykyburz ,
Tree_exiting is the first signal after queue_free() and then tree_exited in the next frame.
For code example: Make a 2D scene with label and timer for example. Label with two signal tree_exiting and tree_exited, timer with Autostart, One-Shot, and WaitTime from 1.2.
extends Node2D
onready var test = false
func _process(delta):
if test == false:
if $Label.is_inside_tree():
print("Exiting")
$".".print_tree_pretty()
else:
print("Exited")
$".".print_tree_pretty()
func _on_Timer_timeout():
$Label.queue_free()
test=true
func _on_Label_tree_exited():
print("Signal: Tree exited")
func _on_Label_tree_exiting():
print("Signal: Tree exiting")
Explanation from the book "GD Script"
https://www.amazon.com/GD-Script-Godot-game-engine-ebook/dp/B07VR8TVWC
I hope this was useful.