Hello, I'm trying to load a text file that contains JSON data as a TextAsset. This works fine if the extension of .txt is used,
For example myJson.txt works with:
TextAsset t = (TextAsset) Resources.Load("myJson", typeof(TextAsset));
However, when the extension is changed to .json, the resource will not load. How can we load the file as a TextAsset despite the .json extension? Is there a better way to load text from a file on runtime?
↧