Play Again - How to Reset any Scene in Unity #shorts




Published: 19 Jan 2023

Full Tutorial: https://youtu.be/fIZ9m7A1pUA


In this beginner-friendly tutorial you will learn how to reset a scene in Unity back to its original state after the player has died, lost, or even won!


This concept is pretty straightforward, we'll use the SceneManager to load the current game scene again, which will unload the active version that has been mutated, and restore it back to the original version!


I'll also talk a little about how to transition between scenes and when you might consider a loading screen over just swapping levels with a transition!


πŸ’Έ Ongoing sales πŸ’Έ

⚫ MalberS Animation Sale: https://assetstore.unity.com/publisher-sale?aid=1101l9QvC

⚫ Use code

"LITTLEDRAGON" at checkout to get the Little Dragon asset for free! https://assetstore.unity.com/packages/3d/characters/creatures/little-dragons-sea-69048?aid=1101l9QvC

⚫ See all active asset sales on the Asset Store: https://assetstore.unity.com/?on_sale=true&orderBy=0&rows=96&clickref=1100lwtudvMJ&utm_source=partnerize&utm_medium=affiliate&utm_campaign=unity_affiliate&aid=1101l9QvC

⚫ Save 25% off your first Asset Store Order: https://prf.hn/click/camref:1101l9QvC/creativeref:1011l78340

⚫ Save up to 50% on NEW Assets: https://assetstore.unity.com/?new_sale=true&orderBy=1&aid=1101l9QvC


πŸ‘¨β€πŸ’» As always, all code from this video is available on GitHub: https://github.com/llamacademy/level-resetting


πŸ“š Resources:

⚫ Scene Manager Unity Docs - https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.html

⚫ Async Scene Transitions Tutorial - https://youtu.be/UoiuKeyGjc8


Believe in LlamAcademy's mission and have received value from the videos? Consider becoming a Patreon supporter or YouTube Member😎: ⚫ https://www.patreon.com/llamacademy

⚫ https://www.youtube.com/channel/UCnWm6pMD38R1E2vCAByGb6w/join


πŸ“± Let's stay connected

YouTube: https://youtube.com/c/LlamAcademy

Patreon: https://www.patreon.com/llamacademy

Facebook: https://facebook.com/LlamAcademyOfficial

Twitter: https://twitter.com/TheLlamAcademy

TikTok: https://tiktok.com/@LlamAcademy

Instagram: https://instagram.com/LlamAcademy


----

Most tutorials come from knowledge gained making https://survival.llama.software Llama Survival - a top-down zombie survival shooter for Android and iOS.

I also have some Unity Assets: https://assetstore.unity.com/publishers/22409?_aid=1101l9QvC

Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.


Connect on Social Media

Some links may be affiliate links, which at no additional cost to you, gives LlamAcademy a small portion of the purchase.