Skip to content
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

Hide TextFiles #51845

Merged
merged 2 commits into from
Aug 18, 2021
Merged

Hide TextFiles #51845

merged 2 commits into from
Aug 18, 2021

Conversation

Paulb23
Copy link
Member

@Paulb23 Paulb23 commented Aug 18, 2021

With #47301 the TextFile resources can at last be hidden.

Given both #47301 and #47268 have been cherry picked for 3.x, I'm tempted have this backported as well, as I hope nobody is relying on TextFiles. But, this would be a breaking change that would need communicating on the release.

Included another minor bug fix that I missed in #51698.

closes #36297
closes #39964
closes #37999

@Paulb23 Paulb23 added this to the 4.0 milestone Aug 18, 2021
@Paulb23 Paulb23 requested review from a team as code owners August 18, 2021 17:09
@akien-mga akien-mga merged commit 1327c77 into godotengine:master Aug 18, 2021
@akien-mga
Copy link
Member

Thanks!

@thebigG
Copy link

thebigG commented Aug 29, 2021

So I recently ran into this. It was actually very confusing as I read docs and thought I could just load the TextFile as a Resource and of course I couldn't load it as a resource. So thanks for hiding them!

I did some digging and I think you guys are very close to being able to just load it as a resource in script. If I understand correctly, part of the challenge for that to happen is that resources have a special syntax like the following:

[gd_resource type="TextFile" load_steps=2 format=2]
[resource]

which makes a lot of sense because all resources are reloaded through a unified interface(ResourceImporter class) and so in essence one would have to write an importer such as ResourceImporterCSVTranslation. Something like ResourceImporterTextFile...and then the editor can have an option to "re-import" as we do with a lot of other resources.

As a user I still think this might be useful for something like a Story(which is the case in my team) that we would like to keep as text file and have it behave like any other resource that we can load.

Not sure if this is the right place for this comment, but figured might leave it here since the PR is related.

Hope these points make sense(perhaps I missed something?).
Thanks for making such an awesome game engine!

@thebigG
Copy link

thebigG commented Aug 29, 2021

I should add that I'll be willing to write this code. I know y'all busy so I would not mind working on this, but I figured I'd bring up it first in case there is something I'm missing.

@Paulb23
Copy link
Member Author

Paulb23 commented Aug 29, 2021

@thebigG If you need to read plain text, you should use the File class.

@thebigG
Copy link

thebigG commented Aug 29, 2021

Thanks for the quick reply!
I see what you mean...it might be overkill to make a plan and simple text file a resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants