LitJSON
Introduction
This week was much more successful than last. My task was split between several students; converting csv to Json, reading the Json, applying the Json to an object. My task this week was the second, getting a Json file that was formatted correctly to be able to be accessed through a script. I felt close to finding what I was after last week, something which turned out to be true, as I found a YouTube guide that taught me how to create a script that used a .Net library called LitJSON to handle conversions from and to Json strings. The guide also went into using LitJSON to call upon specific values under each ID assigned to an object. I used the guide to create a new Json file that contained all the data for both weapons and enemies, had correctly placed commas and such, and was formatted for easy readability/ editing.
Goals
- Create a script that would be able to read from a Json file
- Make script be able to call upon specific values
Personnel
- Primary – Jed May
- Secondary - Ryley Delaney and Zackery Camille
Technologies, tools, and resources used
Tasks undertaken
- Followed YouTube guide to create a Json reading script (2 hours)
- Format a Json file correctly (30 mins)
- Comment on code (30 mins)
What we found out
Being more specific in my search to find what I was after turned out to be key in finding the guide used. Googling ‘Unity Json” would lead me to several tutorials related to saving and loading games (something I could potentially follow up on), whereas googling “Unity Json weapons” and “Unity Json data” lead me to the more useful guides.
Open issues/ risks
The easy accessibility/ editing of the Json file leaves it vulnerable to editing by the player. Finding a way of concealing this data from the player may be necessary. However, this may also be outside of our scope/ concern for now.
Recommendations
Follow the Json formatting I’ve used to create whatever fields/ data that we deem necessary to weapons and enemies. The one I created is an example. Enabling LitJSON in visual studio may be necessary. Guide available here.
SGD300 Dungeon Siege project
Status | Prototype |
Category | Assets |
Author | RevampedCobra73 |
Genre | Action, Adventure |
More posts
- Recreating Dungeon Siege opening cutsceneSep 25, 2019
- Polishing Unity cinematicsSep 19, 2019
- UI elements in Unity cinematicsSep 11, 2019
- Fixing Json and introduction to Unity cinematicsSep 04, 2019
- JsonUtilityAug 28, 2019
- Unity and JSON 2Aug 14, 2019
- Unity and JSONAug 07, 2019
Leave a comment
Log in with itch.io to leave a comment.