Simple Saving and Loading from a File (Unity Tutorial for Beginners)

preview_player
Показать описание
👍 Learn to make awesome games step-by-step from start to finish.
Learn the simplest way for Saving and Loading Data into a File in Unity

If you have any questions post them in the comments and I'll do my best to answer them.

See you next time!

#unity3d #tutorial #unity2d

--------------------------------------------------------------------

Hello and welcome, I am your Code Monkey and here you will learn everything about Game Development in Unity 2D using C#.

I've been developing games for several years with 7 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.

--------------------------------------------------------------------

Рекомендации по теме
Комментарии
Автор

🌐 Have you found the videos Helpful and Valuable?

CodeMonkeyUnity
Автор

Man, I wish I have the same lvl of skillS as he has 😞😟

natsudragneel
Автор

Thank you! Great demo of how to save data. Very helpful.

UndeadEarth
Автор

How would one go about splitting the values into lines?

Ie, instead of 1-2-3-4 you have

1
2
3
4

It has no real bearing on the saving and loading, but does appear somewhat cleaner.

KenanTheFab
Автор

This is great and really helpful! Also I didn't realize you were the one that made Ninja Tycoon and Game Corp!
One problem I had was at 7:44, a lot happens in-between where you cut between clips. The lines of code are totally different, and require a bit of backtracking, which took me a while to figure out, but I got it! Working great with a double for statement to make a total of 78 variables to save in a save file!

cosmology
Автор

@Code Money, I really appreciate you uploading videos, but can you please adjust the volume of your voice during the videos? I gotta turn my volume to max just to hear you only to be blown out by the YT adds. Just food for thought here.

seaderwerks
Автор

thank you! really neat stuff, your the best :D

somnia
Автор

This was great! Thank you for sharing!

GermanVargas
Автор

a great tutorial as always <3
will this system work for a browser-based game or a mobile game, and if not, what is the best way to implement a save and load system on these platforms?

iZemash
Автор

at 7:42 what did you do to make the compiler auto reformat the line about splitting the string on the load function(the bit about stringsplitoptions.None).is there some keyboardshortcut or did you trim the recording to figure all that out and retype it? i was following along quite well until that point.

kylebingham
Автор

hello, great video one question, why should the content[i] be parsed can it not just be casted? what is the difference between parsing and casting?

utkarshjha
Автор

Hi Code Monkey, great Tutorial. I will create a multiplayer rpg with mirror and will find the best solution for save things that work with mirror networking. Maybe this Solution can save a file on the Host Server so a restart of the server don`t reset all. What do you think wich of your 3 methods is the best for my case. ty =)

olimartin
Автор

Hello!!! I am preparing a hypercasual game and users can buy items, my items are scriptable objects. Am I able to use this awesome file to save my bought and not bought items?

onuregeunaldi
Автор

I am getting "IOException: Sharing violation on path" whenever I attempt to read/write the file in any way at all. (WriteAllText or if (!File.Exists)).

I tried using the dispose method but it did not work, what should I do?

Freak_Gamer
Автор

In the build I can found the save file?

showgame
Автор

It says Assets/SaveLoad/Scripts/GameHandler.cs(17, 7): error CS0246: The type or namespace name 'CodeMonkey' could not be found (are you missing a using directive or an assembly reference?)

realthefew
Автор

Im wondering how it knows how many coins i have? Dont you have to refrence it in someway? The code doesnt works for me, im a new programmer btw

grasss-eater
Автор

Hey code monkey, when i try to build the and run my player won´t move, i think this occurrs because of the save game is empty, can you help me with that?

brunofreitas