You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you open a text file (.txt, .cfg, etc.) in script editor and save it, it will create .uid file.
This is wrong for a couple reasons:
.uid files should be generated automatically when resource is detected. In this case it happens only when saving with the built-in editor.
TextFile does not expose any API that would allow to do anything useful, so the UID is useless. Surprisingly though, you can load it and it does return TextFile.
Both come from the fact that TextFile is a fake resource. It does not exist in filesystem, only in memory when you decide to edit a text file. Thus it should not be treated as Resource.
Steps to reproduce
Create a .txt file in a project.
Open it in Script editor.
Save.
Look inside the folder 👀
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered:
The weird thing is, that uid files exactly get created when you save from within the script editor:
No uid created for non-empty files added outside the editor.
I do agree, that uids for .txt (given no ImporterPlugin) make little sense, as they cannot be loaded as resources.
Also: FileAccess.open("uid:://uid-to-resource", FLAGS) works,
while FileAccess.open("uid:://uid-to-text-file", FLAGS) throws "Invalid uid".
As I said, TextFile is a fake Resource. It doesn't have associated ResourceLoader nor ResourceSaver, it exists purely in memory. Text files are useful only with FileAccess.
Tested versions
4.4 beta2
System information
W10
Issue description
When you open a text file (.txt, .cfg, etc.) in script editor and save it, it will create .uid file.
This is wrong for a couple reasons:
Both come from the fact that TextFile is a fake resource. It does not exist in filesystem, only in memory when you decide to edit a text file. Thus it should not be treated as Resource.
Steps to reproduce
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: