How do I let Godot see TXT files in the filesystem panel?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By yatoimtop

I’m trying to write a script that lets godot read a script from an external TXT file, but the filesystem explorer doesn’t recognize it and the code i use to grab it isn’t getting anything it can use. Is there a manual way to make this happen? Or an alternative way to let godot read text files?

This has been answered here:
https://forum.godotengine.org/57130/how-to-import-and-read-text

haimat | 2020-12-16 01:45

i saw that one! i used the code, and it works, but the issue was godot couldn’t even see it at all. i figured it out though, thank you for the help!

yatoimtop | 2020-12-18 03:20

:bust_in_silhouette: Reply From: jgodfrey

It doesn’t look like it’s possible to show TXT file types (and some others) in the FileSystem panel. Here are a few open, related proposals:

Regarding opening / reading a TXT file from code, that should be possible, but without more info, there’s not much else to say.

:bust_in_silhouette: Reply From: yatoimtop

Found it! You have to create the file from the godot scripting window’s file/edit/tools bar thing. Then godot will see and recognize it as part of the project!