-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TextFiles have no ResourceFormatLoader and other related Inspector difficulties. #21787
Comments
cc @Paulb23 thoughts? |
Now that I think about it, there wouldn't really be a way to store Resource-related properties on the TextFile itself. I think you'd have to have a .import file attached to it (or something) just to keep track of that information.
We also can't really do this from GDScript or VisualScript, but those are still "resources", so it's not a hard-and-fast rule that you have to be able to attach a script to all resources. Hmm....just wondering how one might script ones own data types, with a custom structure, by manipulating the TextFile feature... |
I'm thinking that in order to do something like this, perhaps with a .tsv instead to avoid the confusion, you'd have to create a script extending Resource with name TSVFile and then have that .tres file point to a .tsv in your project, providing utilities for them. Anyway, that allows me to fulfill my target use-case, but I guess I'll leave this Issue up in case anyone wants to discuss something of this sort as a possible feature for a future version of Godot (since extending TextFile features to enable other file types is way beyond the scope of this Issue, understanding the implications of it - definitely not for 3.1 then). |
This is expected, the Currently the only way, to edit, save and create |
Adding the "bug" label since saving these files with the default extension of |
This is not closed and needs to be re-opened. Or I can create a new issue if need be. You still can not load a txt file which is the title of this issue. #53025 simply adds more Editor specific support for txt files but it does not allow you to for instance:
|
@FeralBytes You would need to open a proposal to suggest further changes. It's not really clear what |
@aaronfranke thanks for the quick response. I did try that, but due too Issue #24222 which both you and I are also involved in. What happens is the file does not exist on a export file. I did add it to the files that the export should contain but I think it is probably the old .txt.import file issue.
Resulting Output.
|
I don't even know what to say. I printed the var file and suddenly it is working. Even on export. |
Godot version:
Godot 3.1
Issue description:
I wanted to use TextFile to create a script for CSVs (with file extension .csv.txt or .csv.tres or something to avoid the translation assumption). However, there is no way to treat a TextFile as a Resource in the Inspector without creating an error. There are a variety of problems that occur.
If I can't load it into the Inspector, edit a Resource-compatible property (like the script property), and then save it from the Inspector, it doesn't really "work" right as a Resource type.
Steps to reproduce:
No loader found for resource: res://data.csv.txt
error.OR
The text was updated successfully, but these errors were encountered: