+2 votes

I have problem that I can't open resources in release mode.

here's simple code

if file.file_exists("res://engine.cfg"):
    print("res://engine.cfg exists")
else:
    print("res://engine.cfg not exists")

in debug mode, console prints "exists"
but exported app, console prints "not exists"

in Engine by (490 points)
retagged by

2 Answers

+3 votes
Best answer

The file engine.cfg, for release export, is changed to a binary format and renamed to engine.cfb.

by (1,098 points)
selected by

Oh. I see. now it works thank you

+1 vote

Exported to Android by any chance? I think android prevents you from being able to assess res://. But I guess when you export a project the project folder goes away and everything is in the executable or .pck file. So the better method for saving files (reading/writing) is to use user://, which will always be there and is saved in the appdata folder. More info here.

by (855 points)

It's for windows, but thank you for the answer that I did't know that

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 Frequently asked questions and 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 [email protected] with your username.