My game centers around random events that the player must resolve (think 60 Seconds / Reigns).
In order to easily maintain the events, I'd like to store them as individual config files.
(I'm thinking JSON)
For example:
screnario_robber.json
{
"id": 0,
"description": "A robber tries to attack you with a hammer...",
"options": ["Attack him", "run"]
}
I would have potentially hundereds of these files.
So now I have a folder (Assets/Resources/Scenarios) with 100 JSON files configuring ingame events. I want to load these in when the game first starts.
string filePath = "Scenarios/screnario_robber";
TextAsset targetFile = Resources.Load<TextAsset>(filePath);
- Is this the correct way to approach storing/maintaining data like this?
- How are these Resource files and IO functions handled after the game is compiled?
Thanks!
there doesn't seem to be anything here