Ver Fonte

Merge pull request #8900 from skyace65/Autoload

Remove duplicate information in autoload page

(cherry picked from commit 5c926b5180ecdebab0884dd6e895de5f1ccd4387)
Max Hilbrunner há 1 ano atrás
pai
commit
afecefa307
1 ficheiros alterados com 1 adições e 14 exclusões
  1. 1 14
      tutorials/scripting/singletons_autoload.rst

+ 1 - 14
tutorials/scripting/singletons_autoload.rst

@@ -73,21 +73,8 @@ in top-to-bottom order.
 
 .. image:: img/autoload_example.webp
 
-This means that any node can access a singleton named "PlayerVariables" with:
-
-.. tabs::
- .. code-tab:: gdscript GDScript
-
-   var player_vars = get_node("/root/PlayerVariables")
-   player_vars.health -= 10
-
- .. code-tab:: csharp
-
-    var playerVariables = GetNode<PlayerVariables>("/root/PlayerVariables");
-    playerVariables.Health -= 10; // Instance field.
-
 If the **Enable** column is checked (which is the default), then the singleton can
-be accessed directly in GDScript, without requiring ``get_node()``:
+be accessed directly in GDScript:
 
 .. tabs::
  .. code-tab:: gdscript GDScript