๐ Get my Code Monkey Toolkit 50% OFF! https://cmonkey.co/toolkit
โ 50+ Tools and Elements to help you make games BETTER and FASTER!
โค๏ธ FREE Updates to owners, forever!
๐ FREE Complete Courses! https://cmonkey.co/freecourses
โ FREE Game Dev Insights! https://cmonkey.co/gamedevreportnewsletter
๐ฎ Get my Code Monkey Toolkit! https://cmonkey.co/toolkit
๐ด RELATED VIDEOS ๐ด
I've wanted to do this for YEARS! (Code Monkey Toolkit) https://www.youtube.com/watch?v=0AF_y_YiUbM
Learn C# FREE Tutorial Course Beginner to Advanced! [12 HOURS] https://www.youtube.com/watch?v=qZpMX8Re_2Q
How to Write High Quality Code that doesn't fall apart. https://www.youtube.com/watch?v=m0s3IUrWzVQ
Learn Problem Solving (FREE Course, MOST VALUABLE skill) https://www.youtube.com/watch?v=Jgw5Z40Q1vc
Escape Tutorial HELL with my Game Dev Practice Lab! https://www.youtube.com/watch?v=Ng0VH0SmqRo
๐ฌ Let's build a modular Save System in Unity! I start with saving the player's position, then expand it to crates, coins, health, keys and doors. I show how JSON and a simple Save/Load pattern let you store your game state in a file and restore it when you play again.
TIMESTAMPS
00:00 Intro
00:58 Demo scene and saving player position
02:02 JSON and Unity's JsonUtility
03:02 Creating a Save Object
03:58 Converting JSON back into an object
04:52 Writing save data to a file
06:33 Reading save data from a file
07:07 Building the player Save/Load system
10:17 Saving multiple objects
12:02 Combining data in a Main Save Object
12:48 Fixing empty JSON with Serializable
13:56 Loading the player and crate
14:57 Saving dynamically spawned coins
17:38 Recreating coins when loading
18:37 Adding coin data to the Save System
20:04 Recap of the reusable Save/Load pattern
20:50 Saving health, keys and door states
๐ Some Links are Affiliate links which means it costs the same to you and I get a nice commission. Thanks for using them!
If you have any questions post them in the comments and I'll do my best to answer them.
๐ Subscribe for more Unity Tutorials https://www.youtube.com/channel/UCFK6NCbuCIVzA6Yj1G_ZqCg?sub_confirmation=1
See you next time!
--------------------------------------------------------------------
Hello and Welcome!
I'm your Code Monkey and here you will learn everything about Game Development in Unity using C#.
I've been developing games for several years with 9 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users.
--------------------------------------------------------------------
- Website: https://unitycodemonkey.com/
- Twitter: https://twitter.com/UnityCodeMonkey
- Steam: https://store.steampowered.com/developer/EndlessLoopStudios