Where should the Background loading script be put in

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Newby

i am new to background loading and i am wondering where should i put the background loading script. Should i put it in my main scene or call it to my main scene

:bust_in_silhouette: Reply From: pgregory

Normally it is put into a global that is autoloaded, and therefore available everywhere. Just create a new GDScript in the script editor, save it wherever you want in your project, extend Node, and copy the code from the background loading documentation in. Then in project settings, in the autoload section, choose that script and give it a suitable name. This global will be available from all other scripts, so you can call the functions to trigger a background load.