Main Menu Help
I have been working on a main menu for my game. I was watching this tutorial:
https://www.youtube.com/watch?v=WyC2VgFRArY&t=219s
but whenever I clicked on "Start Game", it would skip the beginning of my game. For example, instead of starting on "Day 1", when you click the "Start Game" button, it would send you to "Day 2" and skip "Day 1." I am hoping that there is a way to fix this.
sorry to answer your question with a question but i watched you video. i am on an older version of unity. out of curiosity, is the button editor in the video something from the asset store or is that something comes with unity now? just wondering if im missing something. LOL i've always coded buttons myself. anyways to answer your question. seems your code that is making days go by is probobly running during the menu. whatever code that is in charge of your days could be added using AddComponent("name of script"); only when the button is pushed or simply enabled when the start button is pushed.
its in unity now, there was an entire GUI overhaul to make it easier while still being diverse and intuitive
Answer by WhipJr · Apr 24, 2017 at 04:12 AM
i can't say for sure, but try changing "Application.LoadLevel(1)" to "Application.LoadLevel(0)" depending on the order your scenes are represented in the build manager.
this video tutorial is out of date though, it is using the above mentioned code, however it is now taken care of by Scene Manager.
also just a nit pick at the tutorial, if the person making the tutorial has to copy and paste their own script and doesnt bother to explain anything inside of it on top of it then they probably shouldnt bother creating 'tutorials' and you are better off finding another.
this was literally in the side bar of the video you linked to and it is immediately better. you might consider checking it out instead.
Answer by JollyApp · Apr 24, 2017 at 12:55 PM
@toddisarockstar so I should add AddComponent("name of script"); to my Main Menu Script? Is that the only code I should add to my main menu script or is there more I should add?