@Erich_L said:
I understand everything @TwistedTwigleg said, but I still can't imagine why you'd autoload a scene? Isn't that the same idea as just... launching a chosen scene?
It is pretty similar, the only real difference I can see is that it wouldn't be destroyed automatically when changing scenes.
I could see it being useful if you wanted to split singleton/autoload functionality between multiple nodes, by having the child nodes handle functionality. Something like this, for example:
* Globals (autoload)
* PlayerManager
* EnemyManager
* ItemManager
Then your autoload script could have something like this:
extends Node
var player_manager
var enemy_manager
var item_manager
func _ready():
player_manager = get_node("PlayerManager")
enemy_manager = get_node("EnemyManager")
item_manager = get_node("ItemManager")
Then in scripts you could use it like Globals.player_manager
or Globals.item_manager
. Granted, you could just spawn the nodes and assign the scripts for each manager through the autoload script itself, but spawning a scene would remove the need for some of that code.