Skip to content

Commit 7f662be

Browse files
committed
Remove duplicate information in autoload page
1 parent 62d5d6c commit 7f662be

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

tutorials/scripting/singletons_autoload.rst

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,8 @@ in top-to-bottom order.
7373

7474
.. image:: img/autoload_example.webp
7575

76-
This means that any node can access a singleton named "PlayerVariables" with:
77-
78-
.. tabs::
79-
.. code-tab:: gdscript GDScript
80-
81-
var player_vars = get_node("/root/PlayerVariables")
82-
player_vars.health -= 10
83-
84-
.. code-tab:: csharp
85-
86-
var playerVariables = GetNode<PlayerVariables>("/root/PlayerVariables");
87-
playerVariables.Health -= 10; // Instance field.
88-
8976
If the **Enable** column is checked (which is the default), then the singleton can
90-
be accessed directly in GDScript, without requiring ``get_node()``:
77+
be accessed directly in GDScript:
9178

9279
.. tabs::
9380
.. code-tab:: gdscript GDScript

0 commit comments

Comments
 (0)