Skip to content

Commit

Permalink
Clarify creating a global in Singletons (Autoload) (#10416)
Browse files Browse the repository at this point in the history
The code below to be added to scene 1 and 2 didn't say how to define the global variable, and neither did this, so I fixed it

---------

Co-authored-by: tetrapod <[email protected]>
  • Loading branch information
The-oldone and tetrapod00 authored Dec 18, 2024
1 parent c14d206 commit d5b8afb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tutorials/scripting/singletons_autoload.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ The next step is to add this script to the autoLoad list.
Starting from the menu, open
**Project > Project Settings > Globals > Autoload** and
select the script by clicking the browse button or typing its path:
``res://global.gd``. Press **Add** to add it to the autoload list:
``res://global.gd``. Press **Add** to add it to the autoload list
and name it "Global", which is required for scripts to access it
by the name "Global":

.. image:: img/autoload_tutorial1.webp

Expand Down

0 comments on commit d5b8afb

Please sign in to comment.