Answer the question
In order to leave comments, you need to log in
How to store initial data in Unity under Andriod?
I searched a lot for info, but found nothing intelligible. In general, there is something like an RPG or rather a quest. There is a plot that I have stored in an XML file. On Windows, everything opens normally, but when building the project into an apk file, as far as I understand, the file can no longer be read. Isn't there a more convenient way to store this static initial data without resorting to the perversion of the crutch type on the first input, creating an XML dock from a variable and storing it in some way?
Now the program is designed exactly as I described above, but in future projects I would like to work with files directly, and not use this perversion "variable - crutch - xmlDoc - PlayerPrefs", and then parse the string into xml every time I enter.
Just in case, I’ll clarify, I’m ready to switch to both json and some yaml, as long as it is concise in the code.
Answer the question
In order to leave comments, you need to log in
Add exclusion for existing files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php [L]
but how and where do you store the xml file?)
in the same android assembly perfectly loads files from the same Streaming Assets (only earlier it was definitely necessary to load it via WWW, because there is not quite a file, but through the mount point from the assembly)
you can read more about AssetBundles and Scriptable Object.
in fact, you can safely store any convenient format in the assembly in the form of a binary or text.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question