Unity 5 Tutorial: Save & Load Data C# - The more secure way

preview_player
Показать описание
In this unity tutorial video i want to show you how to store and load data in a binary file. This is a saver and faster way than using playerprefs.
▼▼▼ More Infos here: Check em out! ▼▼▼

ATTENTION!!! This does NOT work for WEB! But everywhere else it should.

Overview:
About this Tutorial: 00:00
The script basics: 02:43
Prepare my other scripts: 05:33
Make moneyScript persistent(static): 05:58
Scripting the Save Function: 13:31
Scripting the Load Function: 24:28
What kinds are serializable: 30:08
The connection to Buttons: 32:39
Where does it save?: 37:06

If you want to delete your savegame write this also in the SaveLoad script and add it to your delete button:
--------------------------------------------------------------------------------------------------
public void Delete()
{
{
}
}

My Udemy Courses (up to 90% Discount)

Support me:

Social Media:

DISCLAIMER:
All content shown in this video is made by myself. This does not include software i use. Youtube / Google is allowed to show & promote my content worldwide. Because of european article 13 now 17 i write this disclaimer here.
Рекомендации по теме
Комментарии
Автор

Perfekt! Genau was ich gebraucht habe. Hab das mit dem Speichern jetzt schon viel zu lange aufgeschoben, fühlt sich gut an, das endlich fertig zu haben und sich den spaßigeren Dingen wie Gegnern und NPCs zu widmen. ^^

GreenLizzards
Автор

Best saving (and most secured) saving tutorial I have seen thanks so much (I have been looking for months)

Kira_Kitsune
Автор

Best serialization tutorial what i seen. Thank you.

davidvlcek
Автор

Thanks for the help. Tested it for Android as well and it works perfectly.

Radmer
Автор

That is working perfectly fine for my 2d rpg game! thanks!

Layla-bjgk
Автор

Thanks for the tutorial! It gave me a good idea on how to store my 2D levels of my game.

Автор

Thanks Man, Really Helpful. Made My Day :)

palamalama
Автор

First off, great video!
Does this method work only for standalone or it works for android games as well?
Thanks

thiagonascimentonogueira
Автор

Awesome stuff OctoMan, thanks for sharing. I was wondering if you know how to create the save files in a different location though, like My Documents for example.

celestialweasel
Автор

hi thanks for the tutorial. i have some dynamic playerprefs from your previous tutorials which determine the name of the level and save a value for each level.Is it possible to create some dynamic variable name and save the value for each level in a binary file?

mominanjum
Автор

Nice! Now let's make a Minecraft clone and save all the million-billion blocks into one file, shall we? :D

NickkSA
Автор

thank you so much it works for me in android and windows,
A quick question, does it save data line by line??
thanks in Advance .!!

IrfanShah-dkmu
Автор

Looks good - can you use this for saving a scene that contains instantiated prefabs?

corriegreen
Автор

hey, i am curious to ask befor i watch this incase its not for me. is just save and loading single objects, or a whole scene? is there anyway to do that? i mean cmon its a gamming engine

UpheavaI
Автор

Erstmal richtig gutes Video :DCan we replace the SaveManager class with a SaveManager struct and make the struct Serializable? Or does the Serializable prefix not work with structs?

techd
Автор

this is the most easy to "understand" tutorial, but thing that make this video look similar to other is you didn't write the code in your description for copy and pasting, just like the other video, we must write it manually .

qofgcmy
Автор

textfile data read it is a binary format data it is not readable format
sir any reference for the readable data in file

rahulpatil
Автор

Is it possible to serialize an int variable after giving it a number and then deserialize it another scene to obtain that number given before? Like Save in one scene and load in another?

zedzamorin
Автор

Hello man you do a great job but can you help me with something? When i play the game and after i save and at the same time i go back to other scene i have this error "NullReferenceException: Object reference not set to an instance of an object
Saving.Save () (at Assets/Saves/Saving.cs:21)".I don't know what to do thanks for help.

bery
Автор

Is it possible to add new fields to the SaveManager in the next version of the game and deserialize them with default values from old save file with "coins" field only? In other words, can I change the structure of save-file from version to version? Thx

oriontvv
join shbcf.ru