Skip to content

Instantly share code, notes, and snippets.

@Razzlegames
Last active August 29, 2015 14:26
Show Gist options
  • Save Razzlegames/1adbf780609320fdd5e3 to your computer and use it in GitHub Desktop.
Save Razzlegames/1adbf780609320fdd5e3 to your computer and use it in GitHub Desktop.
#*****************************************************************
func _ready():
var child_count = get_tree().get_root().get_child_count()
var scene = get_tree().get_root().get_child(child_count-1)
print("current scene" + str(scene) + "child count: "+ \
str(scene.get_child_count()))
pass
# Output:
#
#** Debug Process Started **
#current scene[Spatial:583]child count: 13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment