Тёмный

Basic Saving and Loading in Unity with PlayerPrefs 

BMo
Подписаться 32 тыс.
Просмотров 42 тыс.
50% 1

Playerprefs lets you save strings/floats/ints in key-value pairs, and is nice because it comes right out of the box with Unity without having to import any packages or do any extra work.
However, Playerprefs as a save system is very limited, and is not actually intended to store game data, but rather Player Preferences (hence the name) that you might find in, say, an options/settings menu.
With that said, its useful to know, and is actually an excellent use case for things like GameJams if you want to have a Save system running quickly and it doesn't need to be complex!
PlayerPrefs Documentation: docs.unity3d.c...
✨Want to support the channel?
Buy me a coffee ☕: ko-fi.com/bmoli
SUBSCRIBE to see future videos, including a more comprehensive Save/Load system!
➤LIKE the video if you enjoyed, it really helps the channel!
➤Join our DISCORD SERVER to become a god amongst men: / discord
Thanks for watching!
#bmo #unity #tutorial

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 40   
@AndrewGieraltowski
@AndrewGieraltowski Год назад
We used this tutorial to make our first game "Rebound Out", just released on iOS and Android!
@heyreefes
@heyreefes 2 года назад
Yay you making it. You explain stuff pretty well sir. Tysm for your videos. I ve learnt a lot last two weeks
@mandamoon9149
@mandamoon9149 2 года назад
Bmo’s blowing up 🔥 Congrats on 10k, well deserved man!
@mike_b10
@mike_b10 2 года назад
thanks, looking forward to the follow up
@globes179
@globes179 Год назад
Great teacher, don't stop making these simple tutorials
@godzillakingkongvenom
@godzillakingkongvenom 2 года назад
Congrats on 10k! Holy smokes
@chicao.do.blender
@chicao.do.blender 2 года назад
thanks for the video man, i love your channel, i feel very anxious about completing any game of any size and just watching good tutorials like this make me feel a little bit better, because it's not always about accomplishing but enjoying the ride, and i enjoy your videos
@suicune2001
@suicune2001 2 года назад
Thanks!
@Unbounded7
@Unbounded7 Месяц назад
Trash tutorial, just didnt show anything from the project
@許哲綱-q5d
@許哲綱-q5d 2 года назад
good clear!
@canalataquerapido
@canalataquerapido 2 года назад
I will save all my shit with this
@unitynocode
@unitynocode Год назад
Thanks for the tutorial. This is quick and easy way.
@godzillakingkongvenom
@godzillakingkongvenom 2 года назад
First comment!!!!!!!!
@Stompin40
@Stompin40 2 года назад
Oh wow this was awesome
@carlabalos3884
@carlabalos3884 Год назад
Thanks fast and easy to understand.
@eileeng2492
@eileeng2492 2 года назад
Great vid Understable information
@BMoDev
@BMoDev 2 года назад
Thanks!
@regys9521
@regys9521 2 года назад
your content is just awesome, keep up the good work
@marcusfanning7513
@marcusfanning7513 10 месяцев назад
I'm good to use this for keybinds/weapon loadout choices I'd assume right?
@stefansigurdsson2146
@stefansigurdsson2146 2 года назад
Very nice and easy to follow :)
@ungearedcoder
@ungearedcoder 6 месяцев назад
Thank you so much this really helped me in a last minute situation for a game jam! I subscribed and liked
@cheesyduck3553
@cheesyduck3553 2 года назад
Does the king reply?
@BMoDev
@BMoDev 2 года назад
Of course
@МикитаЛисенко-д6к
I have a question, how i can use PlayerPrefs to the code under the previous video ? ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-kAPIWJJ6NQI.html
@superblue5871
@superblue5871 Год назад
Clear and concise. Thank you!
@Irritate-lu1bt
@Irritate-lu1bt Год назад
sir, can we use that in another scene........please reply if you've seen this
@thimenlabeeuw6576
@thimenlabeeuw6576 5 месяцев назад
Thanks alot really helped me in my project im making it was straight to the point.
@HyperS_LaunchedUpStudio
@HyperS_LaunchedUpStudio Год назад
You can make a custom reader that would make this suitable for larger games
@dkordy
@dkordy 2 года назад
sooo where is that exacly HKCU\Software\ExampleCompanyName\ExampleProductName??????
@AHEK8
@AHEK8 10 месяцев назад
😅
@Predaaator
@Predaaator 11 месяцев назад
Thank you, I love you.
@glad_exe
@glad_exe 7 месяцев назад
Nice tutorial, rlly easy to understand
@voidyll5582
@voidyll5582 9 месяцев назад
Is it a good idea to use a custom save system in conjunction with player prefs? That way you can keep the settings and other persistent player data separate from the core game data. That way the player prefs can persist even if the player creates new save files or loads previously created saves, and so they don't have to resubmit their settings when they make a new save file. I've been trying to figure out how to make that work and I think using a normal encrypted save file in conjunction with player prefs for settings and other persistent data should work well, but wanted to ask if anyone knows of better alternatives, or if it's fine to just do it my way.
@themglegends9495
@themglegends9495 8 месяцев назад
Was thinking the same thing for the system I am making, player prefs for settings and a saving/loading system for actual game data. Don't see why it shouldn't be able to work.
@noobdev6464
@noobdev6464 9 месяцев назад
Can i save vector position with this?
@vikini13
@vikini13 Месяц назад
Yeah but it's harder. I'm making my own game and it was pretty hard but still possible.
@icefox2853
@icefox2853 3 дня назад
As you can see you can save float values. Vector is just a two or three float values. So just devide your vector like vector.x, vector.y, vector.z in each float variable and save it.
@icefox2853
@icefox2853 3 дня назад
And then connect all these floats to your vector, i think it's simple.
@icefox2853
@icefox2853 3 дня назад
Theoretically you can save absolutely everything with these 3 type: string, int, float. But sometimes it is going to be hard.
@hrilahcen8470
@hrilahcen8470 10 месяцев назад
Wonderful
Далее
SAVE & LOAD SYSTEM in Unity
18:20
Просмотров 1,1 млн
How to Build A Save System in Unity
9:41
Просмотров 172 тыс.
Why Solo Developers Should Use Unreal
9:51
Просмотров 387 тыс.
Rethink Everything with Scriptable Object VARIABLES
15:28
20 Advanced Coding Tips For Big Unity Projects
22:23
Просмотров 186 тыс.
How I Would Start Game Development (If I Started Over)
16:59
Be CAREFUL with Scriptable Objects!
8:27
Просмотров 81 тыс.
Better Save/Load using Data Binding in Unity
18:47
Просмотров 13 тыс.