I’ve created a text file “app.conf” inside “Assets/Resources”.
I’m trying to load it as a text file (for reading as a configuration file)
TextAsset confAsset = Resources.Load("app") as TextAsset;
But it always comes back null. Looking through all of the forum posts, I can’t see anything I’m doing wrong.
I’ve triple-checked that it’s in the correct path: Assets/Resources/app.conf
I believe it is because .conf is a recognized extension.
You will either need to change the extension, or do something like file read to load the file.
Edit: I’m dumb. I’m supposed to use only the extension they list. I was thinking I couldn’t use them to avoid conflicts. Using an extension from that link works.
Unfortunately changing the extension didn’t work.
TextAsset confAsset = (TextAsset) Resources.Load("build");
“confAsset” is always null. In my Assets folder, I have “Resources/build.xyz” now. It should find it, but it won’t.