Unity 2D SCENE MANAGEMENT Tutorial

  Рет қаралды 16,926

Rehope Games

Rehope Games

Күн бұрын

In this Unity 2D tutorial we'll talk about Scene Manager system.
When the player reaches the Finish Point the Next Level will be Load.
How to switch between multiple scenes in Unity ?
We'll write simple Scene Controller c# script to load a scene in unity.
Enjoy the video ☕
----------------------------
🖐 Hi Game developer
Welcome to Rehope Games I'm Murat
I share unity tutorial videos on my channel. if you want to make a game with unity (especially 2d platformer game), the videos here will definitely interest you.
----------------------------
#unitytutorials, #unity2d, #unity2dplatformer

Пікірлер: 42
@codywilliamson1323
@codywilliamson1323 28 күн бұрын
lol I just found this guy here is so helpful your getting a sub and when ever I need help am going to watch your videos
@Centaury1
@Centaury1 Жыл бұрын
Merhabalar, çok yardımcı oluyorsunuz gerçekten. Diğer videoları da sabırsızlıkla bekliyorum. Bir an önce gelirse çok güzel olur 😁
@RehopeGames
@RehopeGames Жыл бұрын
Merhaba, güzel yorumunuz için çok teşekkür ederim 🙏 Bunları duymak gerçekten motive edici ve benim için kıymetli 😊
@FernandoPosserPinheiro
@FernandoPosserPinheiro Жыл бұрын
Nice video as always 🙌🏼 Maybe you also could explore strategies for how to load the player in the left or right side in next videos
@RehopeGames
@RehopeGames Жыл бұрын
Thank you so much 😊
@knowledgeseeker8735
@knowledgeseeker8735 Ай бұрын
Guys if you are having same problem as me where you can only start at level 1 or else finish point for other levels dont work then u will have to copy paste game manager to all other scenes manually.
@smbiplob9476
@smbiplob9476 4 ай бұрын
awesome. thank you so much. subscribed
@RehopeGames
@RehopeGames 4 ай бұрын
Thanks and welcome 😊
@biged606
@biged606 Жыл бұрын
First Like!!!👌 amazing tutorial! Just keep going!
@RehopeGames
@RehopeGames Жыл бұрын
Thank you so much that's good to hear 🙏
@GEMAGEMA-xr3rp
@GEMAGEMA-xr3rp Жыл бұрын
Thank you for a great video
@RehopeGames
@RehopeGames Жыл бұрын
thank you for your nice feedback 🙏
@LoneWLF_876
@LoneWLF_876 Ай бұрын
I'm getting the cs1061 error for my codes
@fillowskyy
@fillowskyy Жыл бұрын
Hi! Could you make a tutorial on how to make a unity game like Mamoball? he is very beginner in c# and i can script for walking and other basic stuff but i am having trouble with some things.
@RehopeGames
@RehopeGames Жыл бұрын
I'm thinking of making different 2d games (action , adventure .. etc.) , maybe like mamoball. The important thing is that you learn logic. After learning the logic, you can make any game you want. if you have enough patience and passion you can make your dreams come true. Thank you for your interest 😊
@fillowskyy
@fillowskyy Жыл бұрын
@@RehopeGames thanks for the answer! I don't know much so far, but I'm motivated to learn to create the game of my dreams. I got the basics, but that's just the beginning 😅
@Satenc0
@Satenc0 4 ай бұрын
Works as described, thanks :D, like the way you teach direct to the point, I almost forget to ask, do you know how could I keep my character stats when transitioning scenes? Like in Blasphemous that you transition but keep your health and magic, etc.
@thebigguy270
@thebigguy270 7 ай бұрын
I wonder if this system can be used for secret rooms or something, like how Mario has secret rooms that take you back to the level after being cleared?
@RehopeGames
@RehopeGames 7 ай бұрын
You can create a new scene for the secret room. Or, you can create it in a different position within the same scene. When the player enters the secret room, you can change the player's position. Honestly, I prefer to create the secret room within the same scene. Or, you can also load a different scene within a scene. I wish you success in your project 😊
@Drmelv0131
@Drmelv0131 3 ай бұрын
How about 3D game for 1st person characther between schene??
@eli___7152
@eli___7152 3 ай бұрын
My character does not appear when I change scene. Can someone help me?
@noobdev6464
@noobdev6464 6 ай бұрын
How can i make my character move from one scene to the other and go back to the previous scene from the right, just like in hollow knight when he go back the previous room?
@RehopeGames
@RehopeGames 6 ай бұрын
I understood you question. Actually this is a detailed topic. Maybe i can prepare a video about this topic.
@noobdev6464
@noobdev6464 6 ай бұрын
@@RehopeGames that would be awesome
@noobdev6464
@noobdev6464 6 ай бұрын
@@RehopeGames there is not much information about it, same thing for depth of field in 2d platformer witout bluring the assets in photoshop
@noobdev6464
@noobdev6464 6 ай бұрын
@@RehopeGames are u planning a video about it?
@abhinavkhatana
@abhinavkhatana 7 ай бұрын
need help i want to add condition like if player has collected the key and reached the finish line then the next level will be loaded and if not a message will pop up the collect the key
@RehopeGames
@RehopeGames 7 ай бұрын
Hello, this code will give you an idea. using UnityEngine; using UnityEngine.SceneManagement; public class FinishTrigger : MonoBehaviour { private bool keyCollected = false; void OnTriggerEnter2D(Collider other) { if (other.gameObject.CompareTag("Player")) { keyCollected = true; gameObject.SetActive(false); } } void OnTriggerEnter2D(Collider other) { if (other.gameObject.CompareTag("Player") && KeyPickup.keyCollected) { KeyPickup.keyCollected = false; SceneManager.LoadScene("NextLevelName"); } } }
@abhinavkhatana
@abhinavkhatana 7 ай бұрын
@@RehopeGames thank you
@CAM-IS-NOT-REC
@CAM-IS-NOT-REC 11 ай бұрын
it worked before but now im getting the "NullReferenceException: Object reference not set to an instance of an object" error do you perhaps know why?
@RehopeGames
@RehopeGames 11 ай бұрын
Hello , did you follow me step by step ? I think you probably did not assign the levels to the levels array.
@CAM-IS-NOT-REC
@CAM-IS-NOT-REC 11 ай бұрын
@@RehopeGames i dont know what you mean by levels array, can you specify?
@CAM-IS-NOT-REC
@CAM-IS-NOT-REC 11 ай бұрын
@@RehopeGames "NullReferenceException: Object reference not set to an instance of an object Finish.OnTriggerEnter2D (UnityEngine.Collider2D collision) (at Assets/Scripts/Finish.cs:24)" thats the whole script. The script is called Finish for me but its the FinishPoint script that you made
@RehopeGames
@RehopeGames 11 ай бұрын
Can you show me the line 24 of your Finish script
@CAM-IS-NOT-REC
@CAM-IS-NOT-REC 11 ай бұрын
@@RehopeGames line 20: SceneController.instance.NextLevel(); line 24: SceneController.instance.LoadScene(levelName);
@puriceful
@puriceful Жыл бұрын
Hi Friend I often follow your simple and clear videos for a beginner like me, but now I'm having trouble with this video, I followed all the steps checking and double checking, but I always get the same error message: NullReferenceException: Object reference not set to an instance of an object EndLevel.OnTriggerEnter2D(UnityEngine.Collider2D collision) (atAssets/EndLevel.cs:10) can you please help me figure out where i'm wrong, thanks and keep it up.
@RehopeGames
@RehopeGames Жыл бұрын
Hi , thank you for your interest 😊 Can you show me EndLevel script.
@puriceful
@puriceful Жыл бұрын
@@RehopeGames thanks for the prompt reply, this is the script using UnityEngine; public class EndLevel : MonoBehaviour { private void OnTriggerEnter2D(Collider2D collision) { if (collision.CompareTag("Player")) { // go to next level SceneController.instance.NextLevel(); } } }
@RehopeGames
@RehopeGames Жыл бұрын
did you create SceneController script ?
@puriceful
@puriceful Жыл бұрын
@@RehopeGames yes
@alezpso
@alezpso 8 күн бұрын
have you added "GameManager" to your scene?
Uncover the Simple Trick to KEEP MUSIC PLAYING Between Scenes!
4:42
1❤️#thankyou #shorts
00:21
あみか部
Рет қаралды 69 МЛН
Watermelon Cat?! 🙀 #cat #cute #kitten
00:56
Stocat
Рет қаралды 22 МЛН
Scene Management in Unity | Code Review
10:16
Useless Game Dev
Рет қаралды 4,8 М.
Tips and Tricks For Better Level Setup in Unity
21:36
Lost Relic Games
Рет қаралды 48 М.
Easy Tilemaps and Dynamic Auto Tiling - Unity 2D
5:50
Game Code Library
Рет қаралды 18 М.
Unity 2D lighting Added
1:04
GameAtomic
Рет қаралды 26 М.
UNITY 2D NPC DIALOGUE SYSTEM TUTORIAL
7:52
diving_squid
Рет қаралды 49 М.
2D PATHFINDING - Enemy AI in Unity
23:13
Brackeys
Рет қаралды 801 М.
Creating a Blood Desert with ASEPRITES New TILEMAP Feature
18:04
How to make a BOSS in Unity!
21:54
Brackeys
Рет қаралды 660 М.
1❤️#thankyou #shorts
00:21
あみか部
Рет қаралды 69 МЛН