From 8c06757e080e193db8fccc4c737d2cc072f2fb2b Mon Sep 17 00:00:00 2001 From: Matthew Date: Tue, 4 Jul 2023 07:49:09 -0400 Subject: [PATCH] Merge pull request #7604 from paulloz/dotnet/remove-wrong-autoload-code Remove erroneous C# example about autoloads --- tutorials/scripting/singletons_autoload.rst | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tutorials/scripting/singletons_autoload.rst b/tutorials/scripting/singletons_autoload.rst index a7b3bae10..6bbf3bb57 100644 --- a/tutorials/scripting/singletons_autoload.rst +++ b/tutorials/scripting/singletons_autoload.rst @@ -87,18 +87,13 @@ This means that any node can access a singleton named "PlayerVariables" with: playerVariables.Health -= 10; // Instance field. If the **Enable** column is checked (which is the default), then the singleton can -be accessed directly without requiring ``get_node()``: +be accessed directly in GDScript, without requiring ``get_node()``: .. tabs:: .. code-tab:: gdscript GDScript PlayerVariables.health -= 10 - .. code-tab:: csharp - - // Static members can be accessed by using the class name. - PlayerVariables.Health -= 10; - Note that autoload objects (scripts and/or scenes) are accessed just like any other node in the scene tree. In fact, if you look at the running scene tree, you'll see the autoloaded nodes appear: