Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by JollyApp · Apr 23, 2017 at 10:07 PM · scripting problem2d gamescenelevelscene-switching

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.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image toddisarockstar · Apr 24, 2017 at 03:58 AM 0
Share

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.

avatar image WhipJr toddisarockstar · Apr 24, 2017 at 04:23 AM 0
Share

its in unity now, there was an entire GUI overhaul to make it easier while still being diverse and intuitive

2 Replies

· Add your reply
  • Sort: 
avatar image
0

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

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?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

141 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

[Question] Unity C# Set a Player Class and refence issue 0 Answers

C# scripts not showing up in scene... please help! 0 Answers

Unity Freezes After SceneManager.LoadSceneAsync 2 Answers

My gameobject stops moving after entering the trigger?? 0 Answers

How to store everything from a scene on closing it, to be able to get the same values upon reopening? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges