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 shakey · Feb 19, 2014 at 12:56 PM · loadlevelrestart

Reloading level seems to stop movement

I am trying to re-start the game with a keypress by using Application.LoadLevel(0) but, after the game re-starts, the object I usually move forward with the "w" key no long responds to the "w" key to move forward. So my question is: are there any differences between the actual first time loading the level and loading level 0 in the middle of a game? Put another way, is there a way to make it so that re-starting by loading level 0 will be different from the original start or is that impossible?

Thanks!

Comment
Add comment · Show 6
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 instruct9r · Feb 19, 2014 at 01:00 PM 0
Share

There have to be some other problem with your game. A scene (Level) shoud be working the same way, doesn't matter if you load it once or 100 times.

avatar image whydoidoit · Feb 19, 2014 at 01:18 PM 0
Share

If you use static variables, they will not be reset.

avatar image instruct9r · Feb 19, 2014 at 03:29 PM 0
Share

Correct :). But if you plan to use it in that scene only, then you'll be setting it's initial value in the awake or start functions, which will reset them. :)

avatar image shakey · Feb 19, 2014 at 09:17 PM 0
Share

@instruct9r: If there is another problem, I'm interested in what it could possibly be because I would've thought a LoadLevel would reset everything so as to be exactly the same as if the game were initialized for the first time.

@whydoidoit: That's a good reason - the static variables could make a difference!

@instruct9r: I only have the one scene which I'm reloading and it does not seem that the static variable is reset when I do a LoadLevel("TheScene")

avatar image whydoidoit · Feb 20, 2014 at 06:07 AM 0
Share

They aren't reset unless you explicitly reset them in Awake or Start.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by haim96 · Feb 19, 2014 at 02:03 PM

did you pause the game with time.timescale=0 somewhere? if yes, you should set it back to 1

Comment
Add comment · Show 2 · 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 shakey · Feb 19, 2014 at 09:17 PM 0
Share

No, I did not pause the game with time.timescale=0.

avatar image graaphs · Mar 11, 2021 at 08:38 AM 0
Share

7 years later, thank you. I had a hitPause that set timeScale to 0f then if player died... it never set it back to 1. So reloading the level never had it set back to 1.

Thank you!

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

23 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

Related Questions

Restart Current Level 2 Answers

Current Level Load Again After Level Completion 2 Answers

How can I restart a single-scene game? 1 Answer

Reset The Scene ? 2 Answers

Can't go back to the game scene from main menu for the second time 2 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