how to access to resources In release mode?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By eaglecat
:warning: Old Version Published before Godot 3 was released.

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”

:bust_in_silhouette: Reply From: eska

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

Oh. I see. now it works thank you

eaglecat | 2016-04-03 03:26

:bust_in_silhouette: Reply From: batmanasb

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.

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

eaglecat | 2016-04-03 03:27