CHANGE SCENE WITH BUTTON IN UNITY 🎮 | Scene Manager in Unity | Learn Unity

Sdílet
Vložit
  • čas přidán 5. 08. 2024
  • Today I will teach you how to change scenes in your game, using a scene manager! 🙂 Changing scenes using a manager is definitely the best way to manage your scenes, and in this video I will get you started on creating a simple manager.
    ➤ TIMESTAMPS
    00:00:00 - Introduction
    00:00:47 - What I have so far...
    00:04:00 - Add scenes to build settings
    00:05:13 - Creating the ScenesManager script
    00:14:05 - Creating the UIMainMenu script
    00:18:53 - Creating the UIGameMenu script
    00:20:42 - Creating the ScenesManager game object
    00:21:48 - Testing it out! :)
    ➤ GET ACCESS TO MY LESSON MATERIAL HERE!
    First of all, thank you for all the support you have given me!
    I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!
    I am now using Patreon and CZcams Memberships to share improved and updated lesson material, and for a small fee you can access all the material either from my memberships or Patreon, depending on your preference. I have worked hard, and done my best to help you understand what I teach.
    I hope you will find it helpful :)
    Memberships: / @dani_krossing
    Patreon: / mmtuts

Komentáře • 36

  • @rishvaantht5243
    @rishvaantht5243 Před 7 měsíci +2

    Thank you so much! I was panicking at the last moment and had to hop from tutorial to tutorial and I luckily found yours! right to the point, simple steps and very useful video!

  • @h-tanks7163
    @h-tanks7163 Před rokem +1

    Thank you so muchs! this tutorial not only taught me how to use scenemanager, but I also actually know how to use it more! tysm

  • @FormlessFlesh
    @FormlessFlesh Před 6 měsíci

    Honestly, I feel like I should only watch your videos from now on. You give the best step-by-step instructions, while also giving us options to pick and choose what to use from your lessons. Thank you for what you do!
    If you ever get the chance (and if you haven't done so already, sorry if you have) it would be great to see a video on UI Toolkit C3 programming. Not the making of layouts, but implementing them in your code. I seem to find so many videos on UI design, but they brush over the code so quickly that it's hard to figure out best use cases for each thing.

  • @AnastasiKoko
    @AnastasiKoko Před rokem +1

    Decided to support u on Patreon coz content is just amazing. Good luck!

  • @brandonayala2507
    @brandonayala2507 Před rokem +2

    In my opinion you are single handedly putting unity on your back with teaching. No other video to be found on youtube with clear and cut explanations as yours thank you man!

  • @tonywoods1439
    @tonywoods1439 Před rokem

    Very solid video, great job!

  • @abhinayartham
    @abhinayartham Před rokem

    Explained very nicely! thanks a lot

  • @yousifky
    @yousifky Před rokem

    This man is the best ❤

  • @progoldfish7441
    @progoldfish7441 Před 5 měsíci

    thanks Helped me put together my main menu. although i did it with visual script which was far faster to set up ironically.

  • @MishimaFanatic
    @MishimaFanatic Před rokem +1

    Superb.

  • @Atenvardo
    @Atenvardo Před rokem +6

    Great tutorials, you should definitely think about a Udemy course with such clear and concise explanations, especially for us beginners. Love the content (:

  • @odoyomelody1
    @odoyomelody1 Před 8 měsíci

    Hi, how do you switch from text sentence to another?..is it the same as scene loading method?

  • @Hidesinmud
    @Hidesinmud Před měsícem

    Do you think knowledge of Unity, or rather C#, will be valuable or worthwhile in the next decade?
    I had been using flash mx 2004 for years to do some basic animations, nothing professional, and although it’s a super out of date software a lot of the core components are still what are used today, and I think I’m learning Unity fast because I had that knowledge base.

  • @andrewmettler2228
    @andrewmettler2228 Před rokem

    So, Currently I have a function in ScenesManager() that I call to display the main menu, which contains a button that calls a function to start the game. I call the function to display the main menu in Start() of my GameManager class. When the game starts, the main menu displays, but when I click new game, the main menu briefly disappears but then reappears, and the game never starts. What am I doing wrong?

  • @Director414
    @Director414 Před měsícem

    I wanna make a menu that pauses the game and I'm unsure about how to do this since from what I understand objects gets destroyed upon loading a new scene. Pausing with escape and then having a menu pop up I assume would have a different workflow than this "main menu" tutorial?

  • @HienLe-lf2xc
    @HienLe-lf2xc Před rokem

    Thank you for your amazing tutorial!

  • @gamathon6789
    @gamathon6789 Před rokem

    Hello Danny, please where is the link to the video of how you created the UI elements

  • @Trickl_
    @Trickl_ Před rokem +1

    you explain very well, thank you for making our lives easier kind soul

  • @koraykahraman9031
    @koraykahraman9031 Před rokem

    I can make animations with png by following your tutorials. Can I turn this animation into a button?
    I have a door that opens or closes. I want it to open when clicked. Can you help?

  • @Rainbowunicorn47
    @Rainbowunicorn47 Před 3 měsíci

    I am getting an error whenever i type in the ScenesManager script
    cannot convert from 'string' to 'ScenesManager.Scene
    Can anybody help?

  • @schnex
    @schnex Před 2 měsíci

    the systemManagment does not exist in my project :(
    how do i fix this

  • @mlanc7775
    @mlanc7775 Před rokem

    So I have a ButtonManager script that I use for most of my UI buttons. Inside i have a listener defined like you do and I have a function called buttonClicked() and it would call ScenesManager.Instance.LoadScene(some scene) My problem i'm facing is how can I dynamically create he enum type... Can I define in the inspector which button has which enum value? And then I can pass that into my buttonClicked() function in my button manager?

  • @TheBeastofthem1
    @TheBeastofthem1 Před rokem

    So I'm using the 2021 Version and it says using UnityEngine.SceneManagement is not a thing. Yes I made sure it was the exact same

  • @rebeccabean6157
    @rebeccabean6157 Před rokem

    Hi, I am getting a lot of errors using the scenemanager script and I'm not sure why. Could you possibly look at my code and errors?

  • @somalifreelancer6196
    @somalifreelancer6196 Před rokem

    teacher we need js frameworks like react,vue and also php frameworks please if you have a time somalia africa

  • @favour5442
    @favour5442 Před rokem

    First time I'm noticing that bluish light at the back🌚🌚

  • @spacechroma52
    @spacechroma52 Před rokem

    My entire game design class and our instructor agrees that you look like mr. beast lmao

    • @Dani_Krossing
      @Dani_Krossing  Před rokem +1

      It's either Mr Beast or Elon Musk people say I look like hehe

    • @spacechroma52
      @spacechroma52 Před rokem

      WAHAHA, i love it, ive been following your videos to help better with a game im designing and coding for the class. Overall, videos have helped plenty, were throughly explained. thank you Mr.Beast for the incredible content haha. Ill be sure to leave a mention for your channel thats helped in the game

  • @lilcozygamer
    @lilcozygamer Před rokem +2

    Imagine being THIS handsome and intelligent 🥰😍

  • @mysterious_monolith_
    @mysterious_monolith_ Před rokem

    15:08 (personal timestamp)

  • @did3d523
    @did3d523 Před měsícem

    The script don't inherit a native class that can manage

  • @lestamon6950
    @lestamon6950 Před rokem

    Man thanks but you talk sooooooooooooooo much about unnecesary things likel ( I have two scenes but of course you could have more than that ) ... like cmon man, WE UNDERSTAND.