I've got an autoloaded singleton which stores my game state, including the current level number.
When I press F6 to load the level I'm looking at in the editor, I'd like to alter the level number when the game starts so that it matches that of the loaded level.
My levels are stored logically, eg. res://levels/1.tscn, res://levels/2.tscn, etc., so given the resource path, I'm able to know which level is loaded. This way, whenever a level completes, the level number increments, and so the game knows to load res://levels/(n + 1).tscn as the next scene.
So, is there any way that I can know the resource path of the scene that has been loaded, at runtime, with GDScript?