Use get_current_scene() instead of hack
This commit is contained in:
parent
abf6d2f1e6
commit
073fa75376
|
@ -33,9 +33,5 @@ func _deferred_goto_scene(path):
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
# Get the current scene, the first time.
|
# Get the current scene at the time of initialization
|
||||||
# It is always the last child of root,
|
current_scene = get_tree().get_current_scene()
|
||||||
# after the autoloaded nodes.
|
|
||||||
|
|
||||||
var root = get_tree().get_root()
|
|
||||||
current_scene = root.get_child(root.get_child_count() - 1)
|
|
||||||
|
|
Loading…
Reference in New Issue