mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Clarify creating a global in Singletons (Autoload) (#10416)
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 <145553014+tetrapod00@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user