Browse Source

Update singletons_autoload.rst

fix scene name to match zip template
Hugo Trentesaux 1 year ago
parent
commit
56761ee6fa
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tutorials/scripting/singletons_autoload.rst

+ 2 - 2
tutorials/scripting/singletons_autoload.rst

@@ -262,7 +262,7 @@ Finally, we need to fill the empty callback functions in the two scenes:
     private void OnButtonPressed()
     private void OnButtonPressed()
     {
     {
         var global = GetNode<Global>("/root/Global");
         var global = GetNode<Global>("/root/Global");
-        global.GotoScene("res://scene_2.tscn");
+        global.GotoScene("res://Scene2.tscn");
     }
     }
 
 
 and
 and
@@ -282,7 +282,7 @@ and
     private void OnButtonPressed()
     private void OnButtonPressed()
     {
     {
         var global = GetNode<Global>("/root/Global");
         var global = GetNode<Global>("/root/Global");
-        global.GotoScene("res://scene_1.tscn");
+        global.GotoScene("res://Scene1.tscn");
     }
     }
 
 
 Run the project and test that you can switch between scenes by pressing
 Run the project and test that you can switch between scenes by pressing