Ways of Saving/Loading Data In Unity C# (PlayerPrefs, JSON Serialization, Reading/Writing to Files)

  Рет қаралды 1,501

danqzq

danqzq

Күн бұрын

Пікірлер
@Quinten_exe
@Quinten_exe Жыл бұрын
This is just amazing. I've been looking for a solid way to save and load in the level editor I'm building and this fits my usecase like a glove. Thanks a bunch!
@mleitejunior
@mleitejunior 2 жыл бұрын
Looks great! I am starting a new RPG game and want to save my characters using json first. When it gets done I will migrate to a cloud database to persist. Trying it right now!
@DevNoob
@DevNoob 2 жыл бұрын
Great! I love PlayerPrefs. Nowadays for more secure saving I just use a Unity Asset :D
@danqzq
@danqzq 2 жыл бұрын
Let me guess, "Easy Save"?
@DevNoob
@DevNoob 2 жыл бұрын
@@danqzq hahahahahaha YES!
@DevNoob
@DevNoob 2 жыл бұрын
@@danqzq NO WAIT!! Save Game Free I think its called
@danqzq
@danqzq 2 жыл бұрын
Ah, alright, probably need to see that for myself too.
@lennihuopa
@lennihuopa 2 жыл бұрын
The microsoft article says that an attacker can easily make it vunerable, so it probably doesn't matter if you're just making a game. It might matter then if it is used in some really important apps (like something that communicates with your hardware)
@danqzq
@danqzq 2 жыл бұрын
Yeah, but anything is possible, it has a security risk. BinaryFormatter will also have inconsistent file reading and parsing when adding more fields to your serializable classes. Overall JSON provides better flexibility and its best to prefer using it.
@lennihuopa
@lennihuopa 2 жыл бұрын
@@danqzq i never encountered any issues with binary, and isnt json pretty easy to modify and just cheat the game by that?
@danqzq
@danqzq 2 жыл бұрын
Binary isn't secure either. In fact anything that you store locally will be modifiable. If you want to make sure that nobody cheats by editing your save files - that is a whole another topic to cover. You would be better off to create a server and store every single player's data, which will eliminate cheating.
@lennihuopa
@lennihuopa 2 жыл бұрын
@@danqzq yep but unless you do not watch a tutorial or know how to do it modifying binary is way harder than modifying json
@danqzq
@danqzq 2 жыл бұрын
You can make anything like JSON, XML formats more secure - hard to edit, by encrypting the text that you save, using any appropriate encryption method. The System library has some of its own.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
How to SAVE and LOAD XML Files DATA in Unity
14:41
Beaver Joe
Рет қаралды 11 М.
Unity 2019.3 - Unlocking the mouse cursor
6:25
Grass Cat
Рет қаралды 8 М.
Save and Load Player Position in UNITY C#
4:27
Cezary_Sharp
Рет қаралды 8 М.
All About "static" in Unity C#
10:34
danqzq
Рет қаралды 1 М.
Introducing Clay - High Performance UI Layout in C
35:19
Nic Barker
Рет қаралды 69 М.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41