- Home /
Design/discussion question
Best way to load data from file
Hi all, I was wondering if there are a best way to load data from file. I mean like a standard (or optimized) way to do it.
I need to load a series of enemies to be spawn in a certain sequence and I don't want to decide the order via code, I rather want to be more data-driven. Can I use xml? A plain file? Unity have some pre-made module that does this type of things?
Thanks in advance.
Design/discussion questions should be asked on Unity Forums. But even there you've not provided enough context. The two big questions are 1) what platforms, and 2) is that is static file that ships with the app or a dynamic file that is updated after the app ships. And the size and nature of data might also be helpful.
Take a look at Unity TextAsset class as well as the .NET IO classes and the .NET X$$anonymous$$L classes. There are many posts concerning X$$anonymous$$L on Unity Answers.
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Create shortcut to file in unity editor 0 Answers
Load and save text from web server 2 Answers
Can unity read file in iOS folder? 2 Answers
File handling in unity? 0 Answers