Deserialise quest as json and programmatically add the quest
Posted: Thu Nov 02, 2023 2:24 pm
Hi Tony,
I have read about the quality of Pixel Crushers' support in the reviews and I am not disappointed.
Thanks for your prompt reply earlier on regarding exporting quests as json.
I have managed to export one of the quests as a json file and then I have deserialised it.
Now I have two more questions if you don't mind:
1. To deserialise the json I have created my own 'QuestData' model.
I have a feeling I am complicating my life. Do you have a better way to deserialise imported json quests?
2. Now that I can successfully retrieve every value of a quest, how can I programmatically add the quest in code. I am using C#. I have skimmed through the exhaustive documentation and this forum but I could not find any reference.
Basically what we are trying to prove to our business owners is that Quest Machine allows us to create limitless quests that can be retrieved as json files and offered to our players without need to re-deploy a new version of our application.
Thanks in advance for your help.
Kind regards,
Pier
I have read about the quality of Pixel Crushers' support in the reviews and I am not disappointed.
Thanks for your prompt reply earlier on regarding exporting quests as json.
I have managed to export one of the quests as a json file and then I have deserialised it.
Now I have two more questions if you don't mind:
1. To deserialise the json I have created my own 'QuestData' model.
Code: Select all
QuestData questData = JsonUtility.FromJson<QuestData>(_jsonQuestData.text);
2. Now that I can successfully retrieve every value of a quest, how can I programmatically add the quest in code. I am using C#. I have skimmed through the exhaustive documentation and this forum but I could not find any reference.
Basically what we are trying to prove to our business owners is that Quest Machine allows us to create limitless quests that can be retrieved as json files and offered to our players without need to re-deploy a new version of our application.
Thanks in advance for your help.
Kind regards,
Pier