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 ownerfate · Dec 09, 2013 at 12:06 PM · error-message

[CLOSED] how can i get unity back to the normal timescale after running the game with it set to 0?

i ran into the this problem once before, and they only way i could fix it was scrap the project and re-install unity. which was the only way i got it to work, but i lost 5 months worth of work. and now i am facing the same problem again with a pause menu that did the same thing.

when i wanted to set the pause setting to 0 it worked, but when i tried to unPause it, nothing happened i went into other areas of my game and found that they were paused.

i did try setting the timescale back to 1 but it only worked half way and my character's movements were very choppy and did not preform as intended to.

the script i used was this:

 // Toggles the time scale between 1 and 0.7
     // whenever the user hits the Fire1 button.
     function Update () {
         if (Input.GetButtonDown ("Fire1")) {
             if (Time.timeScale == 1.0)
                 Time.timeScale = 1.0;
             else
                 Time.timeScale = 1.0;
             // Adjust fixed delta time according to timescale
             // The fixed delta time will now be 0.02 frames per real-time second
             Time.fixedDeltaTime = 1.0 
         }
     }

found on the unity Wiki.

and i also get these errors, which i do not know where they come from or the source they are.

if anyone has every faced this problem and found a way to fix it or at least something to resolve it, i would greatly appreciate it.

thank you -

Ownerfate

alt text

tok7.png (8.4 kB)
Comment
Add comment · Show 7
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 meat5000 ♦ · Dec 09, 2013 at 12:45 PM 0
Share

How about this line?

EditorApplication.isPaused = false;

http://docs.unity3d.com/Documentation/ScriptReference/EditorApplication-isPaused.html

avatar image ownerfate · Dec 09, 2013 at 01:16 PM 0
Share

sorry, nothing is happening, still doing the same stuff.

avatar image meat5000 ♦ · Dec 09, 2013 at 01:23 PM 0
Share

If you click on one of the errors does it give you more info at the bottom of the console window?

avatar image Eric5h5 · Dec 09, 2013 at 01:39 PM 0
Share

i lost 5 months worth of work.

Ever hear of this newfangled invention called "a backup"?

avatar image meat5000 ♦ · Dec 09, 2013 at 01:44 PM 1
Share

http://answers.unity3d.com/questions/13544/many-isfinite-errors.html

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by haim96 · Dec 09, 2013 at 03:06 PM

wait, wait... i want to understand... you set timescale=0 somewhere in your code and it messed your editor? you scraped the project and re install because of this?! how is that happen?! why you can't edit your code and remove the timescale line? is this editor script?

Comment
Add comment · Show 4 · 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 ownerfate · Dec 09, 2013 at 03:28 PM 0
Share

yeah, i know it's strange but it effected unity in a way i could not work in any other projects, and even if i did remove it, is set the state to 0 and did not work.

and @meat500: i took a look deeper and found the problem, i had to remove the whole level and rebuild it.

avatar image meat5000 ♦ · Dec 09, 2013 at 04:25 PM 1
Share

I believe pausing your game, your application and your editor could be three different things.

Editor pause is like clicking the editor pause button, Application pause is like when you change between active apps in Android/iOS and your app is temporarily suspended.

To pause the realtime gameplay, playing with timeScale alone should handle things nicely so using actual .pause-like calls will end up having other effects you didn't anticipate, as it seems may be the case.

If you've used OnApplicationPause() to disable all gameObjects or something like this, you may find you need to reenable those objects and also manually call their Start() routines, as I've found to be the case.

avatar image ownerfate · Dec 09, 2013 at 05:15 PM 0
Share

i think you may have something there, let me test it and see what happens.

avatar image ownerfate · Dec 09, 2013 at 05:24 PM 0
Share

ok, 2 things, with time scale, i set it back to 1 which was the default time of unity, i think the game will run, but characters are very choppy in movement, and frame rate was destroyed.

Example: 200 FPS turned into 2 FPS. then stayed up to a constant 15 - 20 FPS.

i will try the ' OnApplicationPause ' function.

tested - somehow it worked, i really don't know why, because i didn't use that function on any script i'v written so far.

but thanks.

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

19 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

Related Questions

Substute for Array.length? 2 Answers

Unity player error 1 Answer

Why am I getting this BCE0019 error? ScreenToWorldPoint' is not a member of 'System.Type 1 Answer

How do I fix this error? I have more errors but this is the main one 1 Answer

error CS0246: The type or namespace name `MultipartStreamProvider' 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