Unity Basics - How to switch Scenes (Levels)

Поділитися
Вставка
  • Опубліковано 13 жов 2024

КОМЕНТАРІ • 24

  • @MetalStormGames
    @MetalStormGames  2 роки тому

    Keep an eye out for more basics videos coming soon as well as some lets make style videos where we create a full game. Thanks for watching.

  • @XxTheSabertoothxX
    @XxTheSabertoothxX 6 місяців тому +2

    Making a simple game as a project, and I could not find a single video that explained scenes/levels and changing them. The way you explained the code was very informative as well. Thank you!

  • @ashrit405
    @ashrit405 Рік тому +3

    Thank you so much you have saved so much of my time and you have explained the video so well. You are very underrated and I hope your channel takes off.

    • @MetalStormGames
      @MetalStormGames  Рік тому +1

      Glad it helped! If there are basic concept videos you would like to see on the tasks that you need in almost all projects please let me know. My goal is to get a good collection of all the common tasks going on this channel so anytime someone asks me a question I can reference a video.

    • @ashrit405
      @ashrit405 Рік тому

      @@MetalStormGames Thank you.

  • @CHEEZEyCHEEZE
    @CHEEZEyCHEEZE 2 роки тому +1

    Dude, watching your videos have explained months of struggle with Unity because everyone else has drag and drop, and hardcoded strings and numbers. Honestly Thank you so much.

  • @VizIchi23
    @VizIchi23 3 місяці тому

    Great video, but I have a question: what's the point of making a "LevelLoader" script when the "Mover" script is what uses the "LoadScene" method?

  • @Jeea84
    @Jeea84 Рік тому

    Thank you very much! I needed to see how to go back to the first scene and your video just nailed it. Thank you

  • @synchaoz
    @synchaoz 2 роки тому +1

    Great little vid. I'd love to see your take on persistent levels (scenes) that allows the player to move back and forth between scenes, effectively revisiting places they've already been, and having those scenes maintain their previous state.
    I've personally managed to build such a system where the player can return to previous levels, and each scene maintain data persistency in terms of certain elements, such as enemies killed will remain dead, blood splatters and broken objects stay where the player left them, etc. It was a huge struggle figuring out how to do so, since as you are no doubt aware, Unity destroys everything in the current scene and loads new scenes fresh, which is not very data persistent friendly.
    Would be super interesting to see your approach to such a feature, for comparison.

    • @MetalStormGames
      @MetalStormGames  2 роки тому +1

      Thats a really neat idea thanks, I wanted to get some more basics videos out covering some of the bare bones concepts and then expand on it. I was thinking make some videos on additive scene loading and things like that in the future. I have never personally done persistent levels myself just because I have never had a need for it but I like that idea a lot. Adding it to the list and will try to play around to test some things in the future for that.
      I also want to make some videos soon on random/procedural level generation and even item generation in the rooms so that persistent level idea could tie in to that a bit as well.

    • @MetalStormGames
      @MetalStormGames  2 роки тому

      I think the Humble bundle is still sale, if you check one of my last videos on the current humble bundle GameDev.TV courses that one does cover this concept a bit in the RPG course. They cover using a system to serialize the data in your level such as items and enemies so that when you come back to the level if you killed an enemy he is still dead and in the same spot. That might help you out a lot.

  • @FENUSfenux
    @FENUSfenux 6 місяців тому +2

    thank you so much omfg i feel like a genius now

    • @FENUSfenux
      @FENUSfenux 6 місяців тому +2

      u are pookie spalunkie :333

    • @FENUSfenux
      @FENUSfenux 6 місяців тому +2

      ty pookie

  • @vetonmavriqi2892
    @vetonmavriqi2892 2 місяці тому

    Should each scene have its own script?

  • @yourexorcist4436
    @yourexorcist4436 9 місяців тому +1

    is this gonna make the complete game havier? (performance and storage space)

    • @MetalStormGames
      @MetalStormGames  8 місяців тому +1

      Not really in that regards, it may cause some load times during your game when you switch scenes but that is the same as any game out there where you will get a load screen and progress bar. For something like a fully open world game they will still usually use a concept of scenes like this but you can load them in seamlessly before they are needed with more advanced features. For instance a huge open world map will be multiple scenes but when the player gets within a certain distance of the end of one scene you could start loading in the next one in the background a bit slower than you normally would so it does not cause any performance drop while the player is playing.

  • @thomaskluck4164
    @thomaskluck4164 Місяць тому

    I´m creating a space shooter and still haven´t got a decent way to switch between different views.
    Can I use scenes for this? Scene 1: Game Menu, Scene 2: level, Scene 3: Boss fight, scene 4: Highscores....
    What are the entities I don´t have access to anymore when switching scenes and which need to be reinitialized?
    What can I still access to make a connection between scenes? Do I have to save to disk or do I keep data in memory?
    Thx for your vid!

    • @MetalStormGames
      @MetalStormGames  Місяць тому +1

      Scenes are basically like levels so yeah Game Menu, Level, Boss things like that would be scenes. For different views if you mean like camera views the player can switch between that wouldnt be scenes you would want to use different cameras or cinemachine for that. As for saving data that will really depend on the game and what you need, you can either save it and load it back in or use dontdestroyonload to make it persist between all scenes.

  • @odoyomelody1
    @odoyomelody1 11 місяців тому

    Hi, thanks for this great video, how would someone switch from text to another text on the same UI page?..is it the same scene level method?

    • @MetalStormGames
      @MetalStormGames  10 місяців тому

      Sorry not too sure what you mean by that, are you just trying to change text on the screen or something more specific?