Using command line for exported games?

kow__kow__ Posts: 24Member

And by that, I just mean if it's possible to get what the arguments.
For example, if I launch the exported game with something like game -arg, is it possible to know the arg? Or is it necessary to compile Godot with the functionality added? Thanks.

Tagged:

Tags :

Answers

  • CalinouCalinou Posts: 189Admin Godot Developer
    Answer ✓

    You can use OS.get_cmdline_args() in GDScript to get an array of command-line arguments.

  • kow__kow__ Posts: 24Member

    Thanks, I don't know how I missed that!

Sign In or Register to comment.