Hi,
I load a JSON file with data (using Newtonsoft.Json) to create my in game map screens in a script List.
public List<ScreenData> screens;
When I run the game I can see the data in my "MapManager" GameObject populated on the fly.
Then I want to use a FSM to access the "screens" List instance, take and item in the list and use the data to draw a screen creating prefabs based on that data.
A sample data in my JSON for a screen is:
{
"id": 6,
"blocks": [
{
"content": "W",
"position": {"x": 0, "y": 0, "z": 0}
},
{
"content": "B",
"position": {"x": 2, "y": 0, "z": 2}
}
]
}
So inside the item I have an Array of "Block" (another class) with content and position. If I have a "W" I'll create a prefab assigned to that W, if is "B", the prefab for "B"
How Can I do this?
Thanks in advance!