How to make a Save & Load System in Unity
Shaped by Rain Studios
View ChannelAbout
Hey there, my name's Trever. A great idea starts as a drop of inspiration, but just as the rain shapes the earth, itโs the consistent nurturing, effort, and perseverance that shapes that idea into something extraordinary. Shaped by Rain Studios is my solo venture that exists to help driven, creative people build projects theyโre passionate about through practical education, tools, and thought-provoking content. I hope the things that I create will help you in your own creative endeavors!
Latest Posts
No results found. Try different keywords.
Video Description
In this video, I show how to make a Save and Load system in Unity that will work for any type of game. We'll save the data to a file in both a JSON format as well as an encrypted format which we'll be able to toggle between in the Unity inspector. *IMPORTANT:* For WebGL games, because WebGL can't save directly to a file system, a different method of storage than we use in the video needs to be implemented. See the pinned comment for more info on this. *IMPORTANT:* Some have mentioned having trouble with Unity versions prior to 2020. I'm not sure on the details, but if you're having issues with the serialization parts of this tutorial, upgrading your Unity version (to 2020 or higher) is something worth trying! Thank you for watching and I hope the video was helpful! ๐ โบ FAQ: I have some of the more frequently asked questions and important information regarding this tutorial in the Pinned Comment; however, more up to date/detailed FAQ's can be found on my Discord server. โบ SAVE & LOAD SYSTEM TUTORIAL PLAYLIST The full Save & Load System tutorial playlist that this video is part of can be found here. https://www.youtube.com/watch?v=aUi9aijvpgs&list=PL3viUl9h9k7-tMGkSApPdu4hlUBagKial โบ TIMESTAMPS 0:00 Intro 0:35 Save & Load System Design 3:25 Creating initial Game Data 4:26 Stubbing out the Core of the System 6:11 When to Save and Load 6:47 Passing Data to other Scripts 10:14 Reading and Writing to a File 16:10 Adding more Data to be Saved 17:15 Saving Collectables in a Dictionary 20:16 Serializing a Dictionary to JSON 23:00 Encrypting the Data 26:11 Outro โบ RESOURCES Application.PersistentDataPath documentation https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html ISerializationCallbackReceiver documentation https://docs.unity3d.com/ScriptReference/ISerializationCallbackReceiver.html NewtonSoft JSON.NET for Unity - which can be used as an alternative to the method shown in this tutorial for serializing more complex data types to JSON. It can be installed through the package manager. https://docs.unity3d.com/Packages/[email protected]/manual/index.html โบ GITHUB PROJECT The '1-starting-point' branch is the starting point of the project for this tutorial and the '2-save-load-implemented' branch is the end result. https://github.com/shapedbyrainstudios/save-load-system โบ MUSIC The backing music is custom made by @themaykit. https://www.instagram.com/themaykit/ โบ DISCORD Come ask questions, suggest a video topic, or just hang out! ๐ฑDiscord โ https://discord.gg/99gcnaHFf9 โบ THE PATH OF REN Wishlist The Path of Ren on Steam! ๐ฎ Steam (The Path of Ren) โ https://store.steampowered.com/app/1619920 โบ SOCIAL MEDIA LINKS ๐ฆ Twitter โ https://twitter.com/ShapedByRain ๐ท Instagram โ https://instagram.com/ShapedByRainStudios ๐ TikTok โ https://tiktok.com/@ShapedByRainStudios ๐ Website โ https://ShapedByRainStudios.com โบ SUPPORT Any support is much appreciated! I may receive a commission on any assets purchased using the below Unity Asset Store link. ๐๏ธ Unity Asset Store Affiliate Link โ https://assetstore.unity.com/?aid=1100lrxm5 โ Buy me a coffee! (Ko-fi) โ https://ko-fi.com/ShapedByRainStudios #gamedev #unity2d #unity
Instant Home Upgrade
AI-recommended products based on this video

RoboSeal Rechargeable Mason Jar Vacuum Sealer for Mason Jars Wide and Regular, One Touch Vacuum Sealer for Jars, 10 Lids Included, Digital Battery Indicator, As Seen on TV

Environet Hydroponic Growing Kit, Self-Watering Mason Jar Herb Garden Starter Kit Indoor, Windowsill Herb Garden, Grow Your Own Herbs from Organic Seeds (Basil)

Windshield Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit (2 Pack) (Black)

Windshield Crack Repair kit Windshield Repair kit, Glass Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit 2 Pack (Drakgray)

Paint Your Own Moon Lamp Kit, DIY 3D Moon Night Light with Space Figurines & Wooden Stand, Art Supplies Creativity Arts & Crafts Kit for Kids, Toys Girls Boy Birthday Easter Gift Ages 3 4 5 6 7 8 9 10 11 12+

LEGO Icons French Cafรฉ Paris Building Kit - DIY Set for Adults - Collectible Bedroom and Home Decor - Display for Home or Office - Gift for Coffee Lovers - 10362

LEGO Icons Bonsai Tree Building Set - Artificial Bonsai Tree Plants for Home Decor, Adults Ages 18+ - Faux, Fake Plants for Table, Desk, Office - Birthday Gift for Men & Women - 10281

Camping String Lights Outdoor, 6 in 1 Outdoor Waterproof Solar/USB Rechargeable Retractable Portable Stowable String Light with 8 Modes (42ft), Tent Lights for Camping, Hiking, Yard, RV (Multicolor)

4 Pack 10FT String Light Poles, Metal Light Poles for Outside String Lights,with Fork,Hanging Light Poles for Patio,Backyard,Garden,Deck,Party,Wedding
