RUVIDEO
Поделитесь видео 🙏

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

📁 Обучение 👁️ 23 📅 29.11.2023

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):
Go to twitter.com or whatevery wegpage you want. Press F12 or right click and select "Inspect" or something like this. The developer console should have opened. Navigate to the "Network" tab and filter the results by selecting "XHR". Reload the page to record the initially loaded data. Now you can see the Http request that were made.

StackOverflow Link (07:27)
https://stackoverflow.com/questions/36239705/serialize-and-deserialize-json-and-json-array-in-unity


=========

? CODE: https://github.com/MichelleFuchs/StoringDataJsonUnity
? DISCORD: https://discord.gg/2sNEerVssZ
❤ SUPPORT ME: https://www.patreon.com/velvary

? PLAY MY GAMES: https://velvary.itch.io/
? TWITTER: https://twitter.com/Velvary1


? ...MORE TUTORIALS: https://www.youtube.com/c/VelvaryGames

=========


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

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Storing Data (Objects & Lists) with JSON - Unity Tutorial 2021», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.