You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Allow .res and .tres extensions in the scene CLI positional argument
This closes #35709.
This commit is contained in:
@@ -1558,7 +1558,11 @@ bool Main::start() {
|
|||||||
} else if (args[i].length() && args[i][0] != '-' && positional_arg == "") {
|
} else if (args[i].length() && args[i][0] != '-' && positional_arg == "") {
|
||||||
positional_arg = args[i];
|
positional_arg = args[i];
|
||||||
|
|
||||||
if (args[i].ends_with(".scn") || args[i].ends_with(".tscn") || args[i].ends_with(".escn")) {
|
if (args[i].ends_with(".scn") ||
|
||||||
|
args[i].ends_with(".tscn") ||
|
||||||
|
args[i].ends_with(".escn") ||
|
||||||
|
args[i].ends_with(".res") ||
|
||||||
|
args[i].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
|
||||||
|
|||||||
Reference in New Issue
Block a user