+1 vote

Hello
I have a problem: I have some .csv, .obj files in my res://assets/some/ directory, when i export my project for win or whatever platform .csv and .obj files not exported, i tried to change my export settings but have no result.
I will be glad for any help.

Godot version 3.2.3
in Engine by (33 points)

Please, form a concrete question.

I have .csv and .obj files in my project. After export (Project->Export->Windows Desktop) .obj and .csv files don't exist, but i need them.

Answered in "answer" section.

1 Answer

+1 vote

You should include said extensions (*.csv, *.obj) in the export non-resources field under Resources tab in export profile. After that your files should be included in export bundle (executable/pck).

But please keep in mind, you won't be able to save anything under Resource path("res:://..." path) - as it's an archive, and not a physical file system.

https://docs.godotengine.org/en/stable/tutorials/io/data_paths.html

To save your data you have to use either User path ("user://...") or handle it by yourself in a platform-specific manner, like absolute paths, or with OS functions, like get_user_data_dir( ).

https://docs.godotengine.org/en/stable/classes/class_os.html?highlight=OS#class-os-method-get-user-data-dir

by (1,646 points)

You should include said extensions (*.csv, *.obj) in the export non-resources field under Resources tab in export profile. After that your files should be included in export bundle (executable/pck).

I tried, but this changed nothing.I use Dir class to get which files in my project and there aren't any .csv and .obj files.

I tried,

How exactly? There's export config in export_presets.cfg.
What's in include_filter, exclude_filter?

I use Dir class

How exactly? There's no "Dir" class.
Show your code.

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.