1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #105288 from bruvzg/uid_custom_scene

Fix custom scene argument if it's referenced as UID.
This commit is contained in:
Thaddeus Crews
2025-04-15 12:28:45 -05:00

View File

@@ -3849,11 +3849,12 @@ int Main::start() {
} else if (E->get().length() && E->get()[0] != '-' && positional_arg.is_empty()) { } else if (E->get().length() && E->get()[0] != '-' && positional_arg.is_empty()) {
positional_arg = E->get(); positional_arg = E->get();
if (E->get().ends_with(".scn") || String scene_path = ResourceUID::ensure_path(E->get());
E->get().ends_with(".tscn") || if (scene_path.ends_with(".scn") ||
E->get().ends_with(".escn") || scene_path.ends_with(".tscn") ||
E->get().ends_with(".res") || scene_path.ends_with(".escn") ||
E->get().ends_with(".tres")) { scene_path.ends_with(".res") ||
scene_path.ends_with(".tres")) {
// Only consider the positional argument to be a scene path if it ends with // Only consider the positional argument to be a scene path if it ends with
// a file extension associated with Godot scenes. This makes it possible // a file extension associated with Godot scenes. This makes it possible
// for projects to parse command-line arguments for custom CLI arguments // for projects to parse command-line arguments for custom CLI arguments