Hello,
I am trying to get the full path of a csv file that I am using as a TextAsset, but it seems that there is no method or property that exposes this.
I need the full path of the file in order to run a parser. I found a workaround just defining a public string and writing there the full path, but I would like to know if there is a more elegant way using TextAsset or something similar.
Thank you!
Can you do this without using Editor Classes?
I want the user to be able to define a TextAsset to use as default. But I will load a different TextAsset based on a particular parameter (language) so the designer can point to the Tranlations_ENG.txt asset and I will load Translations_SPN.txt if the language changes at run time.
At runtime all paths are gone: Unity flattens all the assets for optimal access.
The normal way of supplying multiple localization files is to have a default TextAsset for en_US (like you say), and then query the language, see if the 2-letter language code matches the ones you support, and switch to that TextAsset reference.