Unity Tutorial How To Continue The Game From The Last Saved Scene Or Level Pressing Continue Button

  Рет қаралды 35,871

Alexander Zotov

Alexander Zotov

Күн бұрын

#unitytutorial #unityloadgame #unitysavegame
In the previous video, we created a feature that allows us to load the next or the previous scene when a character touches left or right arrow. In this video we will create another useful feature that will let us to go to main menu by pressing the menu button and go back to the scene we left to continue the game.
TO BLAST! - My New Fun Relaxing Puzzle Game Available On Google Play Store
play.google.co...
Consider purchasing my Ultimate Udemy course with great discount
www.udemy.com/...
Previous Video Here • Unity Tutorial How To ...
If you like what I'm doing then you can support me through
www.patreon.com/alexanderzotov
or here
www.paypal.me/...
Thank you)
What this video is about and what it can be used for also: unity 2d tutorial,
game development, unity game, make unity game, unity 2d, unity continue button, unity continue game, unity scene manager, unity scene management, unity continue scene, unity continue last scene, unity continue script, unity load last scene, unity main menu, unity main menu tutorial, unity main menu scene, unity main menu button, unity back to scene, unity back to menu, unity save game, unity save scene, unity save and load, unity save data, learn unity fast, unity tutorial, how to make games with unity, unity how to make game, unity how to make 2d game, not as good as brackeys but good as well.

Пікірлер: 144
@trevor2363
@trevor2363 Жыл бұрын
Working perfectly thanks so much I really needed a simple resume game command like this now I can make my games more interesting and don't have to restart each time. As always very happy to visit your channel you are very kind to share this as it can be essential to most games developed. I hope in the future unity will implement this out of the box. 🎉
@apenasumrabisco2760
@apenasumrabisco2760 5 жыл бұрын
I have not even seen the video, but I already leave it like I know it's awesome!
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
👍
@jr.studios7148
@jr.studios7148 2 жыл бұрын
FINALLY, I FOUND A REAL TUTORIAL, thanks!!!
@LukaS-gd8ik
@LukaS-gd8ik 2 жыл бұрын
Hello sir, I am really thankful for this good tutorial. I just have one question. After the player starts the game and finishes first two levels and exits to the menu, is there a way to disable the start button so the player cannot play first two levels again? I know I am really late but I would be really appreciate it if I could get an answer.
@Itsysss
@Itsysss 4 жыл бұрын
YESSSS THANKYOU, you are the best developer, you are the only youtuber who did this, I REALLY needed this video, thankyou😀😄
@AlexanderZotov
@AlexanderZotov 4 жыл бұрын
Happy to help :-)
@unityengine7733
@unityengine7733 4 жыл бұрын
Is it just storing the stage name? Is there a way to store the whole stage with all its objects? Unity in this case does not match GameMaker in GameMaker with the word Save the whole stage is saved with all its objects but in Unity everything has to be handwritten Is there a way to code all of the hierarchical window objects with the same amount that they have stored and loaded?
@glacialdoom5435
@glacialdoom5435 5 жыл бұрын
i just want to say thank you man you save me
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You are welcome :-)
@williamjohnson7018
@williamjohnson7018 4 жыл бұрын
Works very good and it was very useful. thank you man. short video big help. you are the man
@AlexanderZotov
@AlexanderZotov 4 жыл бұрын
You are welcome :-)
@gmangman123
@gmangman123 7 ай бұрын
Thank you Master!
@DoomTrooper
@DoomTrooper 5 жыл бұрын
This can be used for multiple applications. You have my thanks ❤
@DoomTrooper
@DoomTrooper 2 жыл бұрын
@Fabian Enrique Martinez It has been quite a while since I used this method. You can make your life easier by using EasySave plugin on the unity store else just use this method. I used this method before I came across EasySave
@EvolveEntertainment_Official
@EvolveEntertainment_Official 2 жыл бұрын
I LOVE YOU! IM SENDING YOU A FREE CODE FOR MY GAME COMING OUT SOON! I'll reply back here once its out. Thank you! This turorial saved me brother.
@tetelp7656
@tetelp7656 2 жыл бұрын
really great Tutorial!
@skywoker123456
@skywoker123456 5 жыл бұрын
Отлично, как раз то что я давно искал)
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
👍
@rajbirsingh2771
@rajbirsingh2771 3 жыл бұрын
Thankyou So Much!!!
@venxi7699
@venxi7699 2 жыл бұрын
Thank You Man
@ElTlap
@ElTlap 9 ай бұрын
Thanks man❤❤❤❤❤
@dartermx
@dartermx 4 жыл бұрын
You are a fucking GOD, i try this for a week!!!!
@prevratnik
@prevratnik 5 жыл бұрын
Great! Very useful! Thanks a million!
@g-dev7336
@g-dev7336 4 жыл бұрын
thank you so much it was very useful for me
@AlexanderZotov
@AlexanderZotov 4 жыл бұрын
Happy to help
@ClashWithHsen
@ClashWithHsen 5 жыл бұрын
Useful in so many ways 👍
@vardaanpawar8775
@vardaanpawar8775 5 жыл бұрын
Bro u are Awesome . thank you very much
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You are welcome!
@learingstudio6857
@learingstudio6857 5 жыл бұрын
Very useful tutorial. Thanks!
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You are welcome!
@AlexanderZotov
@AlexanderZotov 2 жыл бұрын
@Fabian Enrique Martinez it should
@uber6604
@uber6604 3 жыл бұрын
Thanks for help!!
@AlexanderZotov
@AlexanderZotov 3 жыл бұрын
My pleasure
@DarrellBubb
@DarrellBubb 4 жыл бұрын
Thank you very much, it's very useful.🤍
@AlexanderZotov
@AlexanderZotov 4 жыл бұрын
Happy to help
@dlxinteractive
@dlxinteractive 5 жыл бұрын
so does this save the entire scene and loads it back? and if the player saves and quits game will the progress still be there?
@faiz7180
@faiz7180 4 жыл бұрын
does this save entire progress as well? have you tried it?
@AlexanderZotov
@AlexanderZotov 4 жыл бұрын
No, you have to save each parameter separately.
@ontuplayer-bangla171
@ontuplayer-bangla171 4 жыл бұрын
@@AlexanderZotov plss make a video about it
@game_developer_
@game_developer_ 3 жыл бұрын
that's what I'm searching for...
@البيكبنعركين
@البيكبنعركين 5 жыл бұрын
Thank you very much thank thank
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
:-)
@Мир-о5я
@Мир-о5я 4 жыл бұрын
Thank you very much
@beaverjoe9171
@beaverjoe9171 5 жыл бұрын
I likes your tut!
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Thank you very much!
@vitubarocks9702
@vitubarocks9702 2 жыл бұрын
Thank you
@Axel-wi2hw
@Axel-wi2hw 3 жыл бұрын
Great video!
@AlexanderZotov
@AlexanderZotov 3 жыл бұрын
Thank you
@maximilien4996
@maximilien4996 4 жыл бұрын
t'es trop trop mon srab poto merci pour ta video
@liamstudios1390
@liamstudios1390 5 жыл бұрын
omg :) this helps me with my game so much
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Happy to help.
@omersatran6700
@omersatran6700 4 жыл бұрын
Dose it work when you close the game?
@gilmarferraridev
@gilmarferraridev 5 жыл бұрын
thank u so much!
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You are welcome!
@fugazigamer1426
@fugazigamer1426 5 жыл бұрын
Perfect!
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Thank you!
@pittherichkid
@pittherichkid 5 жыл бұрын
Is this just switching between last scene or is it really saving playerposition etc?
@faiz7180
@faiz7180 4 жыл бұрын
Have you tried it? Is this save player last position as well?
@game_developer_
@game_developer_ 3 жыл бұрын
no it doesn't it only saves one perimeter, in this case its saving scene index in int... you can save player position in three different playerprefs.float for X Y and Z pos
@vayneirisu6961
@vayneirisu6961 2 жыл бұрын
i want to ask something , this are using continue button if we change the scene right? but how about if we didn't change the scene and we doing some stuff just in 1 scene? do you know how to save it? because when i try this method . when i'm doing something in just same scene and click continue btn , it goes from start .
@riri6856
@riri6856 5 ай бұрын
have you found a way to do this?
@wignermatos1470
@wignermatos1470 5 жыл бұрын
Amazing
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Thank you very much!
@shadoweagle5843
@shadoweagle5843 4 жыл бұрын
Many thanks! I have one more question. What happens if I turn off the game and then turn it back on and press "Continue"? Will the last played scene appear or will the game be from the beginning?
@landon_irok
@landon_irok 3 жыл бұрын
it will be played from the last scene
@nester.1337
@nester.1337 5 жыл бұрын
hey man this video is great but when the Game scene was saved then if i press the start button or call it "new game" it restarts? i really needed this! Thanks for making this video!!!
@YOURREST
@YOURREST 5 жыл бұрын
Ваши уроки самые понятные :) Спасибо вам Допишите, пожалуйста, этот код с сохранением сцен, но СОХРАЕНИЕМ В РАЗНЫЕ СЛОТЫ
@didoslimani4955
@didoslimani4955 4 жыл бұрын
Tnnnx broo
@Rex-nk1zj
@Rex-nk1zj 4 жыл бұрын
Thanks thanks thanks thanks thanks thanks thanks
@rodsal
@rodsal 3 жыл бұрын
When I exit the game or unity and re-enter the last scene it is not saved and it starts again from scene 1, is there a way to solve this?
@MarcusFenix096
@MarcusFenix096 3 жыл бұрын
Did you set the scene0 in the "Build settings"?
@rodsal
@rodsal 3 жыл бұрын
@@MarcusFenix096 Yes, I did
@candadantawa1437
@candadantawa1437 3 жыл бұрын
Why my VR game in first time start, the continue button work like start button and dont save any thing
@Националпредатель
@Националпредатель 5 жыл бұрын
Привет. У меня выходит ошибка "overwriting the same pass as another open scene is not allowed" в консоли, каждый раз когда я пытаюсь сохранить "нулевую сцену", где располагается меню. Это происходит сразу после первого запуска и проверки перехода между уровня. Связано как-то с "code race condition problem", насколько я понял. Это ничему не мешает, потому что там только две кнопки и ничего пересохранять не надо. У вас такая же ошибка возникала?
@keahikilborn7573
@keahikilborn7573 4 жыл бұрын
is there a way to make it so it wont save different type of scenes??
@ebbevandijk8069
@ebbevandijk8069 5 жыл бұрын
This is useless because it doesn’t save when you quit the game
@liamstudios1390
@liamstudios1390 5 жыл бұрын
:/ get a life kid
@geoskango8873
@geoskango8873 4 жыл бұрын
Yea i want something like that :(
@CrazyyyLowy
@CrazyyyLowy 4 жыл бұрын
Are you sure it doesn't save when you quit the game? I mean it was saved for me in the editor when I Replay the game!
@game_developer_
@game_developer_ 3 жыл бұрын
it does save... but not useful for me
@CrazyyyLowy
@CrazyyyLowy 3 жыл бұрын
@@game_developer_ why? is it because it's not secured?
@XxxClashWithWantedxxX
@XxxClashWithWantedxxX 5 жыл бұрын
Please reply can you tell me how to save the data even when you close the game
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
PlayerPrefs - the easiest way.
@CringeMaster64
@CringeMaster64 4 жыл бұрын
@@AlexanderZotov and how do we do that?
@game_developer_
@game_developer_ 3 жыл бұрын
@@CringeMaster64 the way he shown... playerprefs can save one perimeter like int, float or string so if you wanna to save players position make three playerPrefs.Float for X pos, Y pos and Z pos, it doesn't save whole scene
@XxxClashWithWantedxxX
@XxxClashWithWantedxxX 5 жыл бұрын
Hello can you make one where it saves even when you close it
@geoskango8873
@geoskango8873 4 жыл бұрын
I also want it :( i do not know how to do that
@Dark-gb5xx
@Dark-gb5xx 3 жыл бұрын
hi alexander how can we make it so if a player quits game without clicking quit button the game still saves? i can save by pressing quit button but is there a way to do it without clicking and autosaving after some time?
@AlexanderZotov
@AlexanderZotov 3 жыл бұрын
Do you mean if game crashes for example?
@Dark-gb5xx
@Dark-gb5xx 3 жыл бұрын
@@AlexanderZotov no what is Let's say player finished level 1 and is on level 2 , now if the player quits the game by pressing home button(in android) and then terminating the process from task manager can we make it so the game is continuing from level 2 whenever it is started?
@AlexanderZotov
@AlexanderZotov 3 жыл бұрын
@@Dark-gb5xx I have a video almost about it kzbin.info/www/bejne/q57KeaWArLt8jrc Simply saying you just can use OnApplicationPause() method to save data you want.
@Dark-gb5xx
@Dark-gb5xx 3 жыл бұрын
@@AlexanderZotov thank you sir it helped!!!
@AlexanderZotov
@AlexanderZotov 3 жыл бұрын
My pleasure
@ZarosMaqeRs
@ZarosMaqeRs 5 жыл бұрын
Continue button doesn't work, won't even load the saved game, also once you exit the game it doesn't keep the saved scene stored...
@game_developer_
@game_developer_ 3 жыл бұрын
it doesn't save scenes... playerprefs can only save either int, float or string.
@2.5dboy20
@2.5dboy20 4 жыл бұрын
Will this work for a 3d game?
@game_developer_
@game_developer_ 3 жыл бұрын
yup
@kmtechnicalpoint2402
@kmtechnicalpoint2402 3 жыл бұрын
What is PlayerPrefs ?????? Plaese replay ....
@faiz7180
@faiz7180 4 жыл бұрын
Does this save player last position as well?
@game_developer_
@game_developer_ 3 жыл бұрын
yup, but you have to have three different Floats for X Y and Z.
@ongamely6503
@ongamely6503 5 жыл бұрын
How to save data in scene like score or health bar it's only save scene not data
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You can save any simple data this way.
@tudordacian2789
@tudordacian2789 4 жыл бұрын
is there any way to download button script for touch buttons ? please?
@game_developer_
@game_developer_ 3 жыл бұрын
?
@ghiiann1827
@ghiiann1827 5 жыл бұрын
this work for 3d project ?
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Yes.
@ghiiann1827
@ghiiann1827 5 жыл бұрын
@@AlexanderZotov thanks , u best man
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You are welcome!
@baldchessman
@baldchessman 5 жыл бұрын
Will it work in a 2d random world generator
@game_developer_
@game_developer_ 3 жыл бұрын
I think this method will be hard
@baldchessman
@baldchessman 3 жыл бұрын
@@game_developer_ thx for answering *a year later*
@EMRAutumn
@EMRAutumn 5 жыл бұрын
if i close the app and open it again.. the game will continue where you left?
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
There is only one way to find out ;-)
@geoskango8873
@geoskango8873 4 жыл бұрын
Yea i also want something like that to continue game frome scence where you left. Even when you leave game. Maby it will be batter with checkpoints
@turansoftware6866
@turansoftware6866 5 жыл бұрын
How delete saved scene?
@BlaZeHDSwe
@BlaZeHDSwe 5 жыл бұрын
how do i make Play button to work
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
What do you mean?
@BlaZeHDSwe
@BlaZeHDSwe 5 жыл бұрын
@@AlexanderZotov Hey, im getting a problem im making a game a 2d game wher you run i a forest. after completing the game i realize that i need to make a continue so if you close that gmae you can still play. but after make the hole video you can click play and then when you click on continue it restart at the start off the game. Thats the problem. its like i click on play. it does the same thing.
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You can save data you need (Player position, score, lives amount etc.) using PlayerPrefs when you quit the game and then load that data when you want to continue.
@geoskango8873
@geoskango8873 4 жыл бұрын
@@AlexanderZotov hey man pls can you do some tutorial about how to to something like that maby checkpoints. And also i want it to work even when you quit the game. Pls teach that us :)
@theyourayclips7609
@theyourayclips7609 4 жыл бұрын
@@geoskango8873 kzbin.info/www/bejne/n4WWon57YpuWZpI maybe it will help you :)
@aryanraina3631
@aryanraina3631 4 жыл бұрын
-1 from me was useless!
@DeepakYadav-oc6gu
@DeepakYadav-oc6gu 5 жыл бұрын
Hey Alexander thank you so much for your videos. I have learned game development almost from your videos. I have made a game and uploaded it to google play store this is my game play.google.com/store/apps/details?id=com.appnexa.cricketball can you make a video on how to store game data like levels , gamescore locally on the device. even after closing the game when user starts it again in few days, user can play from that very state where he left off(like last level which he have passes). any help would be appreciated. thank you.
@zee2874
@zee2874 10 ай бұрын
What happened to your game?
@pedro-ms6te
@pedro-ms6te 3 жыл бұрын
Bro can u check ur email? I have an issue :( I need help
@AlexanderZotov
@AlexanderZotov 3 жыл бұрын
Hi! I checked. I see that you try to load SavedScene in IrParaONivelQueEstave script. But I don't see you trying to save it in Niveis script. So if it isn't saved then it can't be loaded.
@pedro-ms6te
@pedro-ms6te 3 жыл бұрын
@@AlexanderZotov i saved in options menu in level one
@pedro-ms6te
@pedro-ms6te 3 жыл бұрын
that works too?
@AlexanderZotov
@AlexanderZotov 3 жыл бұрын
Do you mean GuardarNivel script? Is it is so then when do you use it? Where is any button in your scene? To go to main menu for example? When that code is being executed at all?
@pedro-ms6te
@pedro-ms6te 3 жыл бұрын
@@AlexanderZotov in the level 1 options menu there is a button to return to the main menu
@marcelschreiber3266
@marcelschreiber3266 2 жыл бұрын
thank you
SAVE & LOAD SYSTEM in Unity
18:20
Brackeys
Рет қаралды 1,1 МЛН
ROSÉ & Bruno Mars - APT. (Official Music Video)
02:54
ROSÉ
Рет қаралды 60 МЛН
黑的奸计得逞 #古风
00:24
Black and white double fury
Рет қаралды 22 МЛН
Sigma baby, you've conquered soap! 😲😮‍💨 LeoNata family #shorts
00:37
How to Keep and Save Unlockables [Unity Tutorial]
9:18
Comp-3 Interactive
Рет қаралды 10 М.
How Two People Created Gaming’s Most Complex Simulation System
38:54
ThatGuyGlen
Рет қаралды 1,4 МЛН
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,1 МЛН
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 720 М.
I Wish I Had Known This Before I Started Unity Game Development...
11:11
How to make a Save & Load System in Unity | 2022
26:56
Shaped by Rain Studios
Рет қаралды 197 М.
I Paid Fiverr Game Developers to Make the Same Game
10:25
BadGameDev
Рет қаралды 723 М.
TOUCH CONTROLS in Unity!
16:09
Brackeys
Рет қаралды 1,3 МЛН
Using Composition to Make More Scalable Games in Godot
10:13
Firebelley Games
Рет қаралды 237 М.
Saving & Loading a BASIC level in Unity [PlayerPrefs C#]
9:14
SpeedTutor
Рет қаралды 14 М.
ROSÉ & Bruno Mars - APT. (Official Music Video)
02:54
ROSÉ
Рет қаралды 60 МЛН