I am looking to have my game pick from a selection of different 3D scenes as a background for a main menu. I’m unsure of where to start or how to search up the question because I am not sure if that’s even possible. From what I could gather, there is no way to change the Main Scene outside of declaring it in the Project Settings. But I could very well be wrong.
You need to be more clear with you objective, you want to change the entire scene or just want to pick a random scene and apply as background? Because both can be done but with different results. When we talk about change the entire scene we’re talking change from a stage to another as example.
# Create an array and preload all the background you want to use,
# put the path where they saved, this is just an example
var my_backgrounds_preload := [
preload("res://my_background_01"),
preload("res://my_background_02"),
preload("res://my_background_03")
]
func _ready() -> void:
# Randomize the engine seed
randomize()
# Pick a random preloaded scene
var new_background = my_backgrounds_preload.pick_random()
# Create a new instance and add to your current scene
var background_instance = new_background.instantiate()
add_child(background_instance)
# If needed, adjust the position, in this case the value can vary
# acordyling your scene size and camera size, try without this first
# and check the result
background_instance.position = Vector(100, 100)