I’m about to create a playtest for my game and I want there to be a title screen for the players. Every time I want to boot up the game, I want to bypass that title screen though. I know of OS.is_debug_build() so I’d want to use that to detect whether or not it’s inside the Godot editor or not. I just don’t know how to change the project setting for the main scene.
It’s not the correct method to check for the Godot Editor, the correct check is Engine.is_editor_hint().
You need to set your custom splash screen node as a main scene in the ProjectSettings and based on the Engine.is_editor_hint() check - either play the splash screen, or skip right to the main menu.
1 Like
Probably better using command line arguments to skip scenes. You could add this snippet to your main scene
func _ready() -> void:
if "skip-intro" in OS.get_cmdline_args():
get_tree().change_scene_to_file("res://your_other_game_scene.tscn")
Then adding “skip-intro” under Debug > Customize Run Instances > Main Run Args
You will not want to set the Project Settings once the game is running; typically this does nothing as project settings are usually only checked at the start of the game, and your main scene is already being loaded. You could also use an override.cfg
4 Likes