Storing Data (Objects & Lists) with JSON - Unity Tutorial 2021

preview_player
Показать описание
In this tutorial you'll learn how to save and read data into JSON files. We focuse more on lists which needs a little bit more code than default objects, but the latter one is also explained.
JSON files store data in key-value pairs and are mainly used in web languages for communication between client and server, but it is also quite useful for games. Especially since Unity comes with a lightweight JSON serializer. This one unfortunately can natively only convert objects into JSON strings. But storing basic lists is also a very big part in games, e.g. for highscores. This tutorial acts as a preparation for my highscore list tutorial and uses this usecase. However the result is a generic FileHandler script, which can save and than read whatever you want.
It just lacks of file validation and error handling, which is not part of this video.

Explanation to (04:03):

StackOverflow Link (07:27)

=========

=========

Timestamps:
00:00 - Intro
00:23 - Setup Explanation
02:50 - Creating the FileHandler - Writing
03:40 - JSON Explanation
04:24 - Saving the Data
11:45 - Reading the Data
14:36 - Saving & Reading Single Objects
16:02 - Additional Information
Рекомендации по теме
Комментарии
Автор

This is so well done! This video is easily one of the most helpful, informative, and well-explained Unity saving tutorials I could find. The quality of the video deserves at least a couple hundred thousand views!
You make amazing stuffs and deserve so much recognition. Thank you for sharing your knowledge!

xyhc-cnc
Автор

This is one of the best videos about a subject in Unity, the quality is very good, keep going !!!
Thank u for this video !

josepereira
Автор

Thank you so much Michelle for putting this together. I have to watch it over and over to understand it.

barmonk
Автор

11:30 i was sure that there will be a mistake in my code, but nah,
this tutorial is amazing, im glad i found you

pawegorka
Автор

Great! Thanks for keeping it generic and walking us through the steps!

thyroid
Автор

Thanks, Velvary! You saved me heaps of times searching for the clearest explanation for JSON savings~~~~ Highly recommended for beginners to JSON!

NicholasAYam
Автор

Excellent. The last part about writing/reading single objects was especially a nice touch :D

chrischains
Автор

Thank you very much! I was looking for it for a looong time

Spacing_Gaming
Автор

Incredibly valuable information. I've been searching for how to do this for so long but there's very few clear, through, well put together videos like this. Thank you so much for taking this time.

lilbocheap
Автор

Even the Brackeys textbooks didn’t help me, but it all looks good in this video, thank you. I subscribed

YadroGames
Автор

you are simply amazing!!! my headache is now gone. Thank you for being you and doing what you do

jasons
Автор

That was a really good tutorial! Everything was really well explained and to the point. Keep up the great work! :)

sidhuarya
Автор

Even after a year this video helps me a lot. Thanks :D

ALEXWARDRAGON
Автор

This is just what i was searching for! Thank you!

andreychumakov
Автор

Thank you for this tutorial with great detail. Very informative and non dependent on other deeper knowledge.

Metalsorow
Автор

Explanation is better than others nice job 👍

cagricibuk
Автор

Just what I needed, but was lazy to look for =)

fabioburkard
Автор

Amazing tutorial. You have a new subscriber, and I look forward to watching your other videos.
Thank you so very much for the time and effort put into this.

simonak
Автор

Thank you so much, this is exactly what I needed :)

Avogeorgee
Автор

You Made My day Thank you and also you have lovely voice

piotrgora
visit shbcf.ru