Save & Load System in Unity - Bug Fixes, Scriptable Objects, Deleting Data, Backup Files, and More

preview_player
Показать описание
This video wraps up the previous Save & Load System tutorials I've done by fixing some bugs, answering some frequently asked questions, and adding some extra polish and reliability to the system.

Topics include various bug fixes and improvements from the previous tutorials, saving data from scriptable objects, deleting profile data, adding a confirmation prompt, backing up save files, and more!

The video is separated by timestamps where each timestamp is mostly independent from the others in the video. So feel free to skip passed timestamps that don't interest you.

Thank you for watching and I hope you found something useful out of this video! 🙂

► SAVE & LOAD SYSTEM TUTORIAL PLAYLIST
The full Save & Load System tutorial playlist that this video is part of can be found here.

► TIMESTAMPS
0:00 Intro
0:42 Removing the 'ref' keyword
1:42 Removing the sceneUnloaded event (MissingReferenceException)
3:41 Setting the first selected button alternative
5:15 Persisting data for Inactive (disabled) GameObjects
6:08 Persisting data for Scriptable Objects
10:51 Deleting Data for a Save Slot
16:20 Creating a Confirmation Popup
23:55 Improving Auto Saving
26:47 Backing up Data Files
32:26 Outro

► RESOURCES

► GITHUB PROJECT
The '4-save-slots-implemented' branch is the starting point of the project for this tutorial and the '5-bug-fixes-and-polish' branch is the end result.

► MUSIC
The backing music is custom made by @themaykit.

► DISCORD
Come ask questions, suggest a video topic, or just hang out!

► THE PATH OF REN
Wishlist 'The Path of Ren' on Steam!

► SOCIAL MEDIA LINKS
Follow my current project!

► SUPPORT
Any support is much appreciated! I may receive a commission on any assets purchased using the below Unity Asset Store link.

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


Another FAQ that didn't make it into this video involves how to load a specific scene on startup rather than the hard coded "SampleScene" used in these tutorials. In short, one way to go about this is saving the current scene the player is in as part of your GameData and then loading the value from that when we transition to the initial scene from the main menu. A detailed step-by-step solution can be found under the FAQ section on my Discord server under the channel for those who would like more guidance.

ShapedByRainStudios
Автор

Mad props for your extended work and retrospective here! I can't tell you how many times I've gotten to a final video in a series only to get obscure errors and see a ton of comments trying to debug the issues. seriously, thank you for this man :)

mattsponholz
Автор

The best series about Save & Load System in history of youtube!

reynielmahinay
Автор

One of my biggest pain in making games in Unity, as noob, has always been the save/load system because there is so much to go through.. but this series covered every step so perfectly and so well explained! I'd like if one day you can cover a proper way to impement an inventory system like adding or removing an item and keep it update with the save/load system.

vincentsplatterent
Автор

I was afraid to start working on a save system due to all the cases that need to be covered. But damn, this tutorial is pure goal, you've covered everything a newby can imagine they need and don't understand how to do. Keep these tutorials coming!!!

mirtzata
Автор

This series helped me greatly. The clarity is perfect, thank you very much!

epiphanyatnight
Автор

Thanks for the series and this video! Hopefully all the tutorials out there do something like this. Thanks!

jeshuanavarrogarcia
Автор

Im late to the party and I never take the time to comment a video, but I have to say that your tutorials were amazing, they helped me a lot not only to build the save system, but also to understand a lot about programing.... thank you so much.

degs
Автор

what an amazing series. i cant thank you enough for providing such valuable information!

edganmolla
Автор

Just got through all of your Save & Load System videos and truly appreciate the knowledge sharing and clean-cut videos. Not only did you help me build it out step by step but provided clear understanding on why you were taking that approach, which in turn made me learn a lot. I was able to easily integrate this into my game with a few tweaks. Much appreciated Trever, I look forward to checking out some of your other videos!

fakenuzz
Автор

Wow, love these tutorials! I wish I had them 3 years ago when I was trying to solve these specific problems...
A quick note about autosave lagging the game, it's fairly easy to throw such file IO operations onto a second thread using a System.Tasks. Just be sure to serialize the game state on the main thread.

nicholassantorelli
Автор

This tutorial series is probably one of the best, if not the best I´ve ever seen for unity. You sir, are a legend.

dominikfischer
Автор

Thank you very much for fixing the bug, I like it.

heattik
Автор

Thank you for such an awesome video series... This helped me out so much!

TwoHornsYoutube
Автор

awsom work! I like your coding style and your explanation make me very clear.

nakato-bzfr
Автор

This tutorial is absolutely amazing, thanks a lot

remiboutroux
Автор

23:55 If you want to save your game with zero lag you can use the C# keywords "async" "await" to create a Task that runs on a secondary thread, you can use this for read/write data and pretty much do anything other than reference the UI (which runs on primary thread). There are tutorials on Youtube, it's not as fully fleshed out as other languages and the syntax is kinda weird but it gets the job done and is pretty useful for executing heavy functions without impacting performance

ultimatesin
Автор

just finished everything in the series. Took me 2 weeks to learn and write down everything (I handwrite it ) so I can better understand and write myself. Thanks a lot, this is amazing !

BluzStudios
Автор

thanks, helped a lot, very underrated channel, deserves more

KademirGames
Автор

This tutorial helped me a lot, thank you <3

yasin_ozbek