+2 votes

I currently have a custom user dir to go on a folder that is "AppData\Roaming\CheviRPG" the problem is that is I give my project to my friends they would have to manually create that "CheviRPG" folder, is there a way to make a folder in "%AppData%"?

in Engine by (60 points)

Nevermind I used

   var d = Directory.new()
    if not d.dir_exists("C:/Users/<username>/AppData/Roaming/CheviRPG/"):

and it worked fine

1 Answer

0 votes

You should use the more portable "user://" prefix instead. That will automatically map to the AppData folder for the game and be usable in other environments such as Mac and Linux. For more information on data paths please see the Godot docs for data paths.

by (212 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.
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.