0 votes

Is there a way to get the directory that the game's .exe file is?

asked May 11, 2017 in Engine by Mudley (56 points)

2 Answers

+1 vote
Best answer

Something like Globals.globalize_path("res://") should do the trick.


answered May 11, 2017 by eons (7,764 points)
selected May 11, 2017 by Mudley
0 votes

In Godot 3.2 you can use OS.get_executable_path() to get the path of exe file (including the exe filename and extension). If you want to get only the directory use OS.get_executable_path().get_base_dir()

answered Mar 4 by earlroxas (68 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.