From 5c44bdf74cf47465e44af0c3f3152a25af90b46b Mon Sep 17 00:00:00 2001 From: Fallayn <30709206+Fallayn@users.noreply.github.com> Date: Tue, 17 Oct 2017 22:06:34 +0200 Subject: [PATCH] singletons_autoload.rst: Eplain Singleton names... ...can be used directly. --- learning/step_by_step/singletons_autoload.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/learning/step_by_step/singletons_autoload.rst b/learning/step_by_step/singletons_autoload.rst index df1223ed..fa459605 100644 --- a/learning/step_by_step/singletons_autoload.rst +++ b/learning/step_by_step/singletons_autoload.rst @@ -49,6 +49,13 @@ This means that any node can access a singleton named "playervariables" with: :: var player_vars = get_node("/root/playervariables") + player_vars.health + +Or even simpler using the name directly: + +:: + + playervariables.health Custom scene switcher ---------------------