Unity EASY SAVE Tutorial

  Рет қаралды 24,741

Pandemonium

Pandemonium

Күн бұрын

In this tutorial we will create an easy save system in Unity using binary serialization and combine it with our car selection tutorial.
Support Pandemonium on Patreon:
➤ www.patreon.com/pandemonium_g...
➤Starting project: drive.google.com/file/d/1hyjF...
➤Complete project: github.com/nickbota/Unity-Sav...
Join the Discord to get help and suggest new videos and follow me on social to see the latest updates and other shenanigans.
➤ Discord : / discord
➤ Instagram: / pandemonium_games
➤ Facebook: / pandemoniumgm
➤ Twitter: / pandemoniumnick
➤ Itch: nickbota.itch.io/
#pandemoniumgames #unitysavesystem #unityhowtosave #unityhowtoload
Tags: unity how to save,unity easy save tutorial,unity save for beginners,how to load in unity,unity how to save and load,how to save in unity,unity easy save system,unity how to save and load data,unity saving and loading,unity save system,unity easy save and load,unity saving and loading system,pandemonium games,unity save tutorial,unity load tutorial,unity binary serialization,unity binary save,unity savefile,unity save,unity load,unity easy save
0:00 Intro
0:15 How Binary Serialization Works
1:47 Saving
4:31 Loading
5:55 Saving & Loading our Car
7:50 Creating & Loading Game Scene
9:15 Instantiate Car Model Into the Game
12:45 Final Result

Пікірлер: 90
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
I'm a bit under the weather so my voice is a bit weird, sorry about that. If you have suggestions or you need help let me know as always 🙂
@yugbhagat6531
@yugbhagat6531 3 жыл бұрын
yeah, just change the tone in-between..u know what i mean....like uk just bring some enthusiasm ..i guess XD
@Aleksandr_Mak
@Aleksandr_Mak 2 жыл бұрын
Man! You're the best. I finally did a save for my game.
@ExoticElephantStudios
@ExoticElephantStudios 2 жыл бұрын
Thanks Pandemonium, very cool
@W1nDs0R
@W1nDs0R 3 жыл бұрын
Your video are fantastic, thanks so much and keep up the good work :)
@eddie.z
@eddie.z 3 жыл бұрын
Great Tutorial :) I might use this for one of my future videos! Thanks!
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
Glad to hear it helped, send me a link when it's uploaded 😁
@turb0lt610
@turb0lt610 2 жыл бұрын
Great tutorial. Can you make a tutorial about Play Services Cloud Save ? I added this saving method to my game and I would like to save the data on cloud as well.
@MrBear69
@MrBear69 2 жыл бұрын
would it also be possible for you to make a map selection, that will work with the current car selection? Would be awesome to see that
@thushanjananeththi3591
@thushanjananeththi3591 2 жыл бұрын
Thanks , it's realy working.
@M1dn1ghts0n
@M1dn1ghts0n 9 ай бұрын
this tutorial is great, but I don't know how to make the camera follow the spawned in character as it only spawns in during game and never stays in scene.
@bodhizatva
@bodhizatva Жыл бұрын
hey man great tutorial, I have a question. Everything works just fine when the game is running. as soon as I stop playing its as if it deletes the data saved. starts back from 0. I'm saving an int. wondering if its something you've come across. while the game is running it keeps saving and keeps correct data.
@blacklight8932
@blacklight8932 3 жыл бұрын
Thanks
@Drygasanime
@Drygasanime 2 жыл бұрын
Everything works except now when I load car after selection, camera falls through floor. I suspect its because I have to attach "parent rigidbody" of the car, but with this method there are no cars in the scene, only the CarController which only just loads in the selected car, so if I attach camera's "parent rigidbody" to it, it doesnt work as intended.
@john_donne
@john_donne 4 күн бұрын
Bro Thank You!!!
@MR.OOFofficial
@MR.OOFofficial 15 күн бұрын
can you make a video of saving money using the same file next time?
@StigDesign
@StigDesign 3 жыл бұрын
Love it :D :D Thank you :) i hope you make more tutorials like this :D like at the moment am working on i got the car and track selection working thanks to your car selection tutorial :D right now am working on how to get the hud on the car to set it properties like speed text tacometer dial image(i think its called) hehe, i have it working but not that they find/get the stuff only that i have 2 cars with 2 huds XD
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
Awesome! Will need more explanations on the second part. You want to make a speedometer, right? But you also want to have 2 speedometers for 2 different cars?
@StigDesign
@StigDesign 3 жыл бұрын
@@PandemoniumGameDev oh no i haave allready made the code for speedometer , and text on canvas and also image they both react properly for the car. :) my prtoblem is that i have 2 cars so far, and since i havnt coded: find canvas/ Get object in awake in the hud, so i have manually added its public in inspector the different parts: rpm text speed text with bool if Mph or Km/t and image that slice`s depending on the speed :D since i have done this in this way(i knwo is noob way and not efficent hehe), but it works :D big down side is that since i have manually assigned the different stuff i need to have its own canvas for each car XD. right now i have i have a Global controll that has 2 bools that gets chekked wich is true in awake: 600SL or HotRod: if(600SL) { 600SL Hud.setActive(True) } etc :D
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
@@StigDesign oof, that's gonna be a pain in the ass if you add more cars, DM me on discord if you want help fixing it, we can simplify it and make it work for every all your cars
@StigDesign
@StigDesign 3 жыл бұрын
@@PandemoniumGameDev hehe i know XD thats kind of you :) i will Join Your discord, and also send you dm :)
@vressentials
@vressentials 2 жыл бұрын
Cool tutorial dude, really trying to understand how to select a song then load that song into the next scene, I think this is going to help
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Really glad to help!
@VinnyKoder
@VinnyKoder Жыл бұрын
hey i am new in this field please help me in game screen how to control and follow car camera ?
@yugbhagat6531
@yugbhagat6531 3 жыл бұрын
yayyyyyyy!!!!
@dkordy
@dkordy Жыл бұрын
This is fantastic, but I have a big problem that I can't solve, can I get a little help? Since my player was followed by a camera, I attached a script to follow the player's transform. and now after player selection, the camera continues to follow the character's model holder as the clone walks off into the distance. I can't figure out how to redirect the camera to follow the player clone through code?
@mileman5072
@mileman5072 Жыл бұрын
@Pandemonium thx for the vid mate, what would be the easiest way to reseet all the playerdata?
@PandemoniumGameDev
@PandemoniumGameDev Жыл бұрын
You can delete the save file by using File.Delete() make sure to use the same path and name that we used for creating the save file for this.
@yugbhagat6531
@yugbhagat6531 3 жыл бұрын
hey, we need more tutorials!!
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
Yeah 😁 working on episode 3 of the platformer series but I'm also moving to a new place now so my January is kind of a clusterf*ck. Starting from next week you're gonna get weekly videos.
@yugbhagat6531
@yugbhagat6531 3 жыл бұрын
@@PandemoniumGameDev oh great, take your time buddy , we need CONTENT , also i have exams back to back for the next 4 months so no issues man take your time
@user-wj1sp7yv3v
@user-wj1sp7yv3v 7 ай бұрын
Who can help? I have a problem that when I load the car onto the stage with the car, everything seems to work, but the problem is that I have control of the car on my phone and canvas scripts in it, when I load it in the car, all the scripts disappear! what can you do?
@MH_Create
@MH_Create 3 жыл бұрын
How to create Customization Menu in unity For Cars like Spoiler or sport wheel ,.... how do it?
@kushalbaid
@kushalbaid 3 жыл бұрын
Amazing
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
you are amazing for watching 🙂🙌
@somethingnew4650
@somethingnew4650 3 жыл бұрын
Hello i have a question? how could i save it to sqlite db?
@yassinplays1369
@yassinplays1369 2 жыл бұрын
Tysm
@JonniPerez-kj2rm
@JonniPerez-kj2rm 22 күн бұрын
The button for to back to seletion dont work help me plis
@micheleguardabasso8162
@micheleguardabasso8162 2 жыл бұрын
Can you please help me for save and load system in unity?
@nerdherd179
@nerdherd179 2 жыл бұрын
i'm copy your code but why in savemanager.cs is error ? how to fixed that problem ?
@erdemakar
@erdemakar 3 жыл бұрын
Great tutorial! I have a question, what if we have a save file but then we update the script and add new variables in it. Our save file does not have these new variables, can it cause issues in the future updates of the game?
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
Good question, depends on the type of variable. If it's a type that can't be null like an int, bool, float etc then no, it's gonna work fine but have the default value (0, false etc). If it's a type that can be null like an array you need to add a safeguard in the Load() method. For example: if(playerAbilities == null) playerAbilities = new bool[6]; Check out the tutorial that is premiering in 2 hours, I have something like that there.
@erdemakar
@erdemakar 3 жыл бұрын
@@PandemoniumGameDev Thank you so much it will definitely helps me, can't wait to watch it! :)
@yassinplays1369
@yassinplays1369 2 жыл бұрын
You Are Hero
@ExoticElephantStudios
@ExoticElephantStudios 2 жыл бұрын
how to make multiple save slots?
@maxk0655
@maxk0655 3 жыл бұрын
Hi at first awesome tutorial. But I have a question how can I make my camera follow the car. This is my curent script: using UnityEngine; public class CameraFollow : MonoBehaviour { public Transform target; public Vector3 offset; private void FixedUpdate() { transform.position = target.position + offset; } } It has worked before but not know. I can't ad the car to the camera. Could you please respond.
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
this is weird, the code is correct. What exactly is happening when you drag the car into the camera?
@maxk0655
@maxk0655 3 жыл бұрын
@@PandemoniumGameDev sorry for not answering. Me Pc broke down so I had to build a new one and that used up a lot of my time. What's happening is, that instead of following the car it opens its prefab.
@maxk0655
@maxk0655 3 жыл бұрын
Would it be a possibility, that I just write currentCar instead of target.position so, that the camera will allways follow the choson Car?
@DieserDeutscheTyp
@DieserDeutscheTyp 3 жыл бұрын
Good day, nice tutroail. But ill have an question i only pogram for a few weeks, and i develope a game for android and my question is when i want to update my game is the data that i saved whit this Methode saved or override at updates?(Because i must export the Gam efrom my Pc when i want to update the game).
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
The save file is unique for each device. The save file from your PC will not affect the save file from your Android.
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
If you add new variables to your save system on your PC they will simply be 0 or null on your Android the first time unt you update them on that device as well.
@DieserDeutscheTyp
@DieserDeutscheTyp 3 жыл бұрын
@@PandemoniumGameDev Ok, thank you. Is it possible to try if it work on mobile?
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
@@DieserDeutscheTyp it works for sure on mobile. What I mean is that you can't edit the save file from your phone in your computer, they are independent
@DieserDeutscheTyp
@DieserDeutscheTyp 3 жыл бұрын
@@PandemoniumGameDev Ok, excuse the many questions. However, I would have two final questions. Is it possible to somehow set a starting value of an int? Can I create a function that resets all values when clicked?
@AstroMarioYT
@AstroMarioYT 3 жыл бұрын
Hi, Could you do a Tutorial to how to put the camera following the selected car, Thanks!
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
Hey there, yeah sure. But if you need it RN you can check out this video: kzbin.info/www/bejne/rIDCYmuYncllpKM
@AstroMarioYT
@AstroMarioYT 3 жыл бұрын
@@PandemoniumGameDev I resolved the problem, np
@anncervitillo3746
@anncervitillo3746 2 жыл бұрын
@@AstroMarioYT how
@indiandev1588
@indiandev1588 2 жыл бұрын
Sir I have get some error that when we choose car in main menu that car is not showing in my level sir Can it work for me pls reply
@indiandev1588
@indiandev1588 2 жыл бұрын
Pls reply 🥺🙏🏻🙏🏻😭🙏🏻🙏🏻😭🙏🏻
@h4babi
@h4babi 3 жыл бұрын
I was wondering if it was also possible to save 2d integer arrays? EDIT: This works! However, I had to make a slight change as it threw some error I replaced: FileStream file = File.Open(Application.persistentDataPath + "/gamesave.dat", FileMode.OpenOrCreate) Playerdata_Storage data = (Playerdata_Storage)bf.Deserialize(file); SavedGrid = data.SavedGrid; doGenerate = data.doGenerate; With: using (FileStream file = File.Open(Application.persistentDataPath + "/gamesave.dat", FileMode.OpenOrCreate)) { Playerdata_Storage data = (Playerdata_Storage)bf.Deserialize(file); SavedGrid = data.SavedGrid; doGenerate = data.doGenerate;
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
to be honest, I didn't try but theoretically it should be possible, all these integers can easily be converted into binary
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
try it out and save a simple 2D array and let me know
@h4babi
@h4babi 3 жыл бұрын
@@PandemoniumGameDev I'm not at the point in my game where I'll be doing that (I still have a few more features to implement), but I will definitely try then.
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
@@h4babi interesting, thanks for sharing!
@dkordy
@dkordy Жыл бұрын
Yes, good tutorial, but PLEASE explain. when we select a car and click on the selected one and switch to another scene, how can the camera continue to follow the driver (car) and not just see it
@dkordy
@dkordy Жыл бұрын
please answer,explain?PLEASE, NO ONE explaying that on whole you tube. or i cant find answer
@dkordy
@dkordy Жыл бұрын
i figured out tnx enway
@danielpalma5439
@danielpalma5439 21 күн бұрын
@@dkordy how? i got the same problem
@loghanveilleux
@loghanveilleux Жыл бұрын
how can we do that in 2d? like i want my car to spawn in a 2d space
@PandemoniumGameDev
@PandemoniumGameDev Жыл бұрын
You mean for a 2d game? It's exactly the same process as here, except you'll use sprites instead of 3D models
@loghanveilleux
@loghanveilleux Жыл бұрын
@@PandemoniumGameDev ok very nice thank you😁😁
@krakentanzgames
@krakentanzgames Жыл бұрын
nice and snappy tutorial. thx. but PLEEEAZE get rid of the music in the background!!!! thx
@JonniPerez-kj2rm
@JonniPerez-kj2rm 22 күн бұрын
The button for to back to the selletion dont work plis help meI will to subscribe to your channel plis help me
@crossing_lears
@crossing_lears Ай бұрын
Misleading, was looking for Easy Save tool tutorial...
@Paanch_Tanmatra_Studio
@Paanch_Tanmatra_Studio 2 жыл бұрын
Amazing tutorial. I also have a save system playlist series. It covers from player-pref to Firebase. I am currently editing the video with NodeJS as the back-end server for saving data. Any feedback on it will be really helpful.
@marcdanielmercado6186
@marcdanielmercado6186 3 жыл бұрын
Can this .dat file be saved also in cloud?
@marcdanielmercado6186
@marcdanielmercado6186 3 жыл бұрын
Or do the google play service, have the same concept as this? Thanks
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
@@marcdanielmercado6186 google play services might have some functionality for saving but it's certainly not a text file like this. About cloud really not sure, you probably can but I don't know how to do it right now. Maybe in the future.
@marcdanielmercado6186
@marcdanielmercado6186 3 жыл бұрын
@@PandemoniumGameDev Thanks bro. this google play service cloud saving had been quite a problem to me. anyways, thanks for the respond.
@blueeye1640
@blueeye1640 3 жыл бұрын
how to make it driveable?
@PandemoniumGameDev
@PandemoniumGameDev 3 жыл бұрын
Look for tutorials on car controls, you'll find plenty
@RyanStewart-od9mx
@RyanStewart-od9mx Жыл бұрын
this ruined my game
@thushanjananeththi3591
@thushanjananeththi3591 2 жыл бұрын
Thanks
MAKE EXPLOSIONS in Unity 🔥
9:49
Pandemonium
Рет қаралды 8 М.
Don't eat centipede 🪱😂
00:19
Nadir Sailov
Рет қаралды 21 МЛН
didn't want to let me in #tiktok
00:20
Анастасия Тарасова
Рет қаралды 12 МЛН
Which AI Behavior Framework Should You Use? | AI Series 46
17:26
LlamAcademy
Рет қаралды 33 М.
Saving & Loading a BASIC level in Unity [PlayerPrefs C#]
9:14
SpeedTutor
Рет қаралды 14 М.
Why Pro Unity devs use Odin Validator
13:44
Jason Weimann
Рет қаралды 8 М.
How To Create An Advanced Save System In Unity
16:00
Dapper Dino
Рет қаралды 31 М.
My Personal Do's and Don'ts of Pixel art! (How I make pixel art!)
6:43
Unity Save Game System Tutorial | Save Data To JSON
43:53
Dan Pos
Рет қаралды 12 М.
LEVEL/CAR/WEAPON Selection with Unity Scriptable Objects
28:49
Pandemonium
Рет қаралды 22 М.
[Unity] Introduction to Easy Save assets and how to use them.
10:15
더블엘 DoubleL
Рет қаралды 1,4 М.
200IQ заключенный #фильм
0:57
CutTheStories
Рет қаралды 15 МЛН
suster ngesot salah culik #shorts #upinipin
0:22
Aska Boy
Рет қаралды 37 МЛН
Baby Tvman Passes Mrbeast'S Test And The End 👍️
0:37
BigSchool
Рет қаралды 2,6 МЛН