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.
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?
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 😊
I'm developing a 2D rocket shooting game with a stage progression system. The idea is to progress to the next stage after either a set amount of time has passed or after defeating a certain number of enemies. The difficulty will increase with each stage, but players will still encounter level 1 enemies even as they advance to level 2 and beyond. The gameplay should feel continuous, allowing for ongoing action while gradually increasing the challenge.
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.
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 😊
@@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 😅
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.
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
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"); } } }
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 "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
script for scene controller: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class SceneController : MonoBehaviour { public static SceneController instance; private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } } public void NextLevel() { SceneManager.LoadSceneAsync(SceneManager.GetActiveScene().buildIndex + 1); } public void LoadScene(string sceneName) { SceneManager.LoadSceneAsync(sceneName); } } script for finish: using System.Collections; using System.Collections.Generic; using UnityEngine; public class FinishPoint : MonoBehaviour { private void OnTriggerEnter2D(Collider2D collision) { if (collision.CompareTag("Player")) { // go to next level SceneController.instance.NextLevel(); } } }
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 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(); } } }
Merhabalar, çok yardımcı oluyorsunuz gerçekten. Diğer videoları da sabırsızlıkla bekliyorum. Bir an önce gelirse çok güzel olur 😁
Merhaba, güzel yorumunuz için çok teşekkür ederim 🙏
Bunları duymak gerçekten motive edici ve benim için kıymetli 😊
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
bro you got me each time you say script
😂😂😂 u got me wen u thought of writing this comment LOL!
First Like!!!👌 amazing tutorial! Just keep going!
Thank you so much that's good to hear 🙏
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
Thank you so much 😊
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.
How about 3D game for 1st person characther between schene??
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?
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 😊
I'm developing a 2D rocket shooting game with a stage progression system. The idea is to progress to the next stage after either a set amount of time has passed or after defeating a certain number of enemies. The difficulty will increase with each stage, but players will still encounter level 1 enemies even as they advance to level 2 and beyond. The gameplay should feel continuous, allowing for ongoing action while gradually increasing the challenge.
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.
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 😊
@@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 😅
awesome. thank you so much. subscribed
Thanks and welcome 😊
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.
look into PlayerPrefs
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
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");
}
}
}
@@RehopeGames thank you
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?
I understood you question. Actually this is a detailed topic.
Maybe i can prepare a video about this topic.
@@RehopeGames that would be awesome
@@RehopeGames there is not much information about it, same thing for depth of field in 2d platformer witout bluring the assets in photoshop
@@RehopeGames are u planning a video about it?
@@noobdev6464 You can do that (depth of field) using a Global Volume for Post-Processing, Brackeys has a video on the topic
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?
Hello , did you follow me step by step ?
I think you probably did not assign the levels to the levels array.
@@RehopeGames i dont know what you mean by levels array, can you specify?
@@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
Can you show me the line 24 of your Finish script
@@RehopeGames line 20: SceneController.instance.NextLevel();
line 24: SceneController.instance.LoadScene(levelName);
I'm getting the cs1061 error for my codes
script for scene controller:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneController : MonoBehaviour
{
public static SceneController instance;
private void Awake()
{
if (instance == null)
{
instance = this;
DontDestroyOnLoad(gameObject);
}
else
{
Destroy(gameObject);
}
}
public void NextLevel()
{
SceneManager.LoadSceneAsync(SceneManager.GetActiveScene().buildIndex + 1);
}
public void LoadScene(string sceneName)
{
SceneManager.LoadSceneAsync(sceneName);
}
}
script for finish:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FinishPoint : MonoBehaviour
{
private void OnTriggerEnter2D(Collider2D collision)
{ if (collision.CompareTag("Player"))
{
// go to next level
SceneController.instance.NextLevel();
}
}
}
bruh... I've spent 3-4 hours wondering why it doesn't work, only to find out that I used the wrong Collider
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.
Hi , thank you for your interest 😊
Can you show me EndLevel script.
@@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();
}
}
}
did you create SceneController script ?
@@RehopeGames yes
have you added "GameManager" to your scene?
My character does not appear when I change scene. Can someone help me?
Did u found an answer?
mine also dont appear can you help me please
Thank you brother
thank you
it didnt work
ya hmar give me a dam link to copy and paste the dam code
😂 nice to see another Arab feeling the same way as me here