+1 vote

How do you get the absolute project path?

eg:
C:\Users\Name\Desktop\Project...

There is documentation to get different folders, datafolder even to the engine itself, but nothing about the project path

in Engine by (193 points)
edited by

1 Answer

+3 votes
Best answer
ProjectSettings.globalize_path("res://")

See:
https://docs.godotengine.org/en/3.1/classes/class_projectsettings.html#class-projectsettings-method-globalize-path

Naturally, this is usually only helpful when used by a tool script or plugin or maybe for debugging purposes. When the game is released then the res:// folder might as well be inside a packed file.

by (3,258 points)
selected by
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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.