Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
0
Question by PolymathicIndustries · Mar 20, 2021 at 06:00 PM · main menumainmenu

Main Menu causing glitch

I just created a mini game (roll a ball), a main menu and a game over scene. All the scenes tested individually worked just fine. Then I added them to the build settings and the main menu started glitching upon playing. Also even when trying to play the mini game it loaded the main menu. Below is a picture of the odd error occurring where it will saying "is loading" , "not loading" over and over again very rapidly, not seemingly allowing me to interact with any buttons on my scene. Could anyone tell me what is going on? By the way, there is nothing with a DontDestroyOnLoad in my Main Menu scene.

alt text

capture.png (3.4 kB)
Comment
Add comment · Show 4
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 rh_galaxy · Mar 21, 2021 at 04:46 PM 1
Share

What does your code to change scenes look like?

avatar image MSavioti · Mar 21, 2021 at 08:44 PM 0
Share

Do you use anything that is static?

avatar image PolymathicIndustries · Apr 03, 2021 at 04:49 PM 0
Share

This is what I have for my level manager, nothing static. That's the only code in the scene, used for managing buttons

 public class Levels : MonoBehaviour
 {
     // Start is called before the first frame update
     void Start()
     {
         
     }
 
     // Update is called once per frame
     void Update()
     {
         
     }
 
     public void LevelOne()
     {
         SceneManager.LoadScene("Level 1");
     }
 
     public void Main()
     {
         SceneManager.LoadScene("Main");
     }
 
     public void Loading ()
     {
         SceneManager.LoadScene("Example");
     }
 }
avatar image MSavioti PolymathicIndustries · Apr 12, 2021 at 07:53 PM 0
Share

Those methods are cal UIled by buttons?

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by HellsHand · Apr 12, 2021 at 08:48 PM

Try changing the method name of your main scene method to something besides Main(). Main() in C# is the start of any script when not using Unity so it's possible it might think it's supposed to run that whether or not you called it.

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 PolymathicIndustries · Apr 12, 2021 at 06:40 PM

@rh_galaxy, @MSavioti, any thoughts why this problem would happen with the code above?

Comment
Add comment · Show 1 · 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 rh_galaxy · Apr 12, 2021 at 06:59 PM 0
Share

The code you showed above does nothing on its own. You need to show the code that runs the scene switch. You probably change scenes all the time over and over?

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

115 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

Related Questions

How can i move the camera smooth like flow up and behind the player when clicking the escape key ? 0 Answers

How do i add an extra menu to my main menu (I'm a Beginner programmer!) 1 Answer

How to have music not restart between scenes? 1 Answer

Changing two different objects renderer colour 1 Answer

How to Create a Main Menu with an Animated Background 0 Answers


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