mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Fixed small mistake in example (Thread Safe APIs) (#4778)
Though it's a bit unrelated to the topic of this file, the example demonstrated creating an instance of an instance of a scene.
(cherry picked from commit a0916221b3)
This commit is contained in:
committed by
Rémi Verschelde
parent
747dcf4038
commit
16e3caeab9
@@ -34,7 +34,7 @@ However, creating scene chunks (nodes in tree arrangement) outside the active tr
|
||||
|
||||
::
|
||||
|
||||
var enemy_scene = load("res://enemy_scene.scn").instance()
|
||||
var enemy_scene = load("res://enemy_scene.scn")
|
||||
var enemy = enemy_scene.instance()
|
||||
enemy.add_child(weapon) # Set a weapon.
|
||||
world.call_deferred("add_child", enemy)
|
||||
|
||||
Reference in New Issue
Block a user