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 /
avatar image
0
Question by Gorro_Rojo · Oct 26, 2015 at 06:55 PM · animationsceneparticlesmenulevel

Menu scene not loading correctly, doesn't show particles or animations and buttons behave strangely.

Hello, here's my issue: I'm using the Game Jam Menu for my game Impossible Ships. I got it all up and running for my 1 scene on index 1 (the menu is on index 0) and i got it all working with the pause menu and everything, the issue comes when I tried to make a "Back to main menu" button.

I added the button to the pause menu and linked it to a function i added to the StartOptions script:

 public void LoadMainMenu()
 {
     GetComponent<DontDestroy>().isDestroyed = true;
     Destroy(gameObject);
     Application.LoadLevel(menuScene);
 }

The variable menu scene is set to 0, for that is the menu scene index.

Now when i play, go to the game, pause, and press the newly created back to main menu button, strange things happen.

Not only do all the particles in the main menu dissappear and are the animations gone, but when i press the start button, it stays on the "pressed" mode until i press another one.

All this is fixed when, in this state, i press the options menu and in it i press back, then it's all fixed.

Please help me, i'll post more code if needed.

Normal menu screen Normal menu screen

Menu screen after starting game and coming back Strange menu screen

Comment
Add comment
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

1 Reply

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

Answer by OncaLupe · Oct 27, 2015 at 09:35 AM

I did a quick check of the game jam template, and noticed that that Pause script does a 'Time.timeScale = 0'. This causes Unity to freeze all animations and physics so that the game doesn't keep running in the background. You'll need to set this back to 1 to get the animations and such working again.

You can do this in the main menu in the OnLevelWasLoaded() method. The EventSystemChecker script has one, so if you still use that you can add 'Time.timeScale = 1' to it (probably right at the beginning, just make sure it's outside the if block), or put the OnLevelWasLoaded() method into any other script that would be in scene on load.

Hope this helps. :)

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 Gorro_Rojo · Oct 27, 2015 at 02:35 PM 0
Share

Oh wow thank you so much, truly appreciate it, I never even thought about the pause script, thanks for the help! +1 rep!

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How do people carry over variables to other scenes? 1 Answer

Keeping character's data through levels 2 Answers

Script Help Scene Complete Level 1 Answer

Loading Scene on a series of events 2 Answers

Photon JoinRandomRoom customGameProperties? Load proper scene 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