How do you run individual scenes when using a scene manager?

Godot Version

4.7

Question

I am building a level-by-level 3D adventure game, not unlike Zelda OoT where you load individual scenes with a common player character in between.

Following best practices I created a Scene Manager for my game, acting as a base for loading levels and other elements such as GUI:

In practice, The Levels node changes its contents with each load, and the player gets taken out and inserted in the new level. Pretty standard.

My question is:

How could I make development easier by loading a specific Level directly?

Right now, I have to run the entire game and use save states and other loading shenanigans to get to the point I want to test out. It would be great if I could directly run a Level without everything breaking because the scene manager is not present.

I’m guessing one solution would be to detect if a level is in the root, then do a complete reload of the game with the Level nested inside the manager. But not sure if there is a more straightforward way.

Any suggestions?

I made a similar scene manager system at one point and ran into this same issue. I then discovered autoloads, and did stuff with those in future projects. So, my suggestion would be to use autoloads instead of a scene manager.

What best practices? If there is a list somewhere, I’d like to know about it!

Most of the time there isn’t one best approach to solve a problem, there’s too much variability and context to take into account for that to be possible.

It’s either this or an editor plugin, but the solution you have in mind is probably the best one unless you decide to go with autoloads instead.

What do you mean by ā€œdirectlyā€. Shouldn’t the scene manager be able to load and launch any level on demand? Otherwise there’s no much purpose in having such manager.

The problem is trying to test out a scene directly, running it straight instead of the whole thing.

Yes, the scene manager takes care of it but that means I need to go through the usual steps a normal player needs to (splash screen, load, and so on). I do have some debug shortcuts set up, but it would be more practical to launch a specific level directly without the extra steps.

Well then just run the level scene from the editor.

I have a few conditions to be met to enable a Player to progress from the Entry Scene, through Level 1, Level 2 Scenes etc… These conditions are set as Variables in a Global Variables script. For test purposes, I change these Variables to allow a rapid transition though the game, without having to actually solve all the clues, kill all the beasts etc. Of course I test each Scene beforehand, but, once satisfied, I use the ā€˜cheat’ Variables to go further into the game rapidly. I can set any Level as starting Scene if need be, but I wouldn’t have many of the previously acquired Variables set, so it’s not quite as realistic for testing Play. It suffices for much, but if I want to run through the whole game rapidly, these Global Variables allow for this. It’s best to think these things through early on in the coding of the game (I’m now in my fifth year; progress in slow but sure…); it would be painfully long to run through the game as a ā€˜normal’ Player, even knowing, as I do, how to solve a lot of the enigmas and puzzles.
Does this help at all..?