Those function operate on built-in engine singletons like Engine
or Input
, not on user's autoloads.
print(Engine.has_singleton("Engine")) # prints 'True'
For accessing autoloads one can use the name from the first column of autoload settings, e.g.
NameFromFirstColumn.myFunction()
It only works if "Singleton" column is checked (it is by default).
Since autoloads are direct children of root
their existence can be checked like this:
print( $"/root".has_node("NameFromFirstColumn") )
Naming of "Singleton" column in autoload settings is unfortunate. A better name would be "Global" as it adds a global reference. It wouldn't confuse people as much.
I've opened an issue on github for this:
https://github.com/godotengine/godot-proposals/issues/1649