Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Time Control and Pause Kit (inc. Bullet Time, Freeze, Fast Motion, etc) [RELEASED]

Discussion in 'Assets and Asset Store' started by SketchWork, Jun 28, 2013.

  1. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Hi thyriax,

    Not at all. I checked and haven't got the test scene. Did you send it over?

    Justin
     
  2. thyriax

    thyriax

    Joined:
    Mar 21, 2014
    Posts:
    5
    I've send you a mail with an adress to the test scene.
    Check the first mail i've send.(one month ago)
     
  3. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Got it. Sorry for the confusion. I have sent another reply to your email.

    Justin
     
    Last edited: Apr 14, 2014
  4. ZayLong

    ZayLong

    Joined:
    Jun 2, 2013
    Posts:
    33
    Hi; recently purchased the toolkit and had a quick question. I've been experimenting with the time events and I have an issue where if I call any of the methods of the SWP_Time_Group_Controller then my whole game will pause for a about half a second then resume.

    for instance if I call SlowDownGroupTime(); the entire scene will freeze and jerk for a second before going smoothly again.

    Could this have to do with number of GameObjects? Or possibly the fact that I'm using it with prefabs that are being instantiated at run-time?

    Help would be appreciated....
     
  5. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Hay ZayLong,

    It shouldn't slow down of freeze when changing the speed of several objects. I'm in the process of putting some tests and new examples together for some of the other questions in this thread at the moment as well as testing some new features. I'll add this to my list to test, but I must admit I haven't experienced this myself and I have it running live in quite a complex project.

    Our of curiosity:

    How many objects are you controlling in one group?

    What platform are you running on?

    What kind of objects are you trying to control?

    When you mentioned about prefabs at runtime, it shouldn't make any difference because once the objects are created they should behave like any other unless you are doing some crazy logic in the SlowDown event?

    We'll get to the bottom of your issue.

    All the best,

    Justin
     
  6. ZayLong

    ZayLong

    Joined:
    Jun 2, 2013
    Posts:
    33
    Thanks Justin,

    About 30. Lag is alot less noticeable when theres about 5 or so.

    Running on standard WebPlayer

    2D GameObjects with sprite renderers and 2D rigid bodies; the rigid bodies are used for collision detection.

    All I'm doing is firing a debug.log() on SlowDown event just to test stuff out.
     
  7. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    I have done some optimisations in the latest version. I'm do some tests with the 2.1 version compared with the new 2.2 version with 50 or so objects to see the difference.
     
  8. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    391
    Hi SketchWork. I have just bought and downloaded your plugin. Trying to get things up and running. I have an error on the HOTween plugin, 'HOTweenComponent' could not be found. Please could you offer me some assistance?
     
  9. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Hello silentslack,

    The HOTween plugin is a 3rd party plugin for people who have already got HOTween. It is a free component so just Google it and download it. Once you have included it in your project everything should work fine.

    I hope that helps,

    Justin
     
  10. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    391
    Sorry I wasn't clear, I have the HOTween plugin already. Are you sure your plugin is compatible with their latest release?
     
  11. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    No worries. I'll take a look at their latest release, but unless they have changed something major I can't see it not working. I'll download the latest version and give it a test. I'm not in the office at weekends so I'll add it to my todo list for Monday.

    Justin
     
  12. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    391
    Ok awesome thanks - from what I see there isn't a HOTweenComponent but a IHOTweenComponent.

    I guess this could be quite a hefty feature request but could we get PlayMaker FSMs affected by the time variable? I have many playmakers in my scene that unfortunately continue to execute their sequences when the game is paused. I know that this dude accomplished it here: http://forum.unity3d.com/threads/13...using-without-timeScale-0?p=923714#post923714

    Cheers!
     
  13. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Sure thing. I'll add this to the todo list. I have a large update coming out soon, but that is mainly to help out with people wanting to control a huge number of timed objects.
     
  14. OzDave

    OzDave

    Joined:
    May 19, 2008
    Posts:
    144
    I was hoping to toggle an NGUI button so I sent an email for support SketchWork
    If you want to reply here for other Ngui users as well, I am ok with that.
     
  15. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Hello OzDave,

    The easiest way would be to add a link to the GlobalTimeController inside your c# script and call the PauseGlobalTime and ResumeGlobalTime accordingly. I have added a couple of lines to the script you emailed me below:

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class NguiPauseScript: MonoBehaviour
    5. {
    6.     [SerializeField] SWP_TimeGlobalController thisGlobalTimeController;
    7.  
    8.     // Use this for initialization
    9.     void Start ()
    10.     {
    11.    
    12.     }
    13.    
    14.     // Update is called once per frame
    15.     void Update ()
    16.     {
    17.    
    18.     }
    19.  
    20.     public void GlobalPause()
    21.     {
    22.         if (SWP_TimeGlobalController.IsPaused)
    23.             thisGlobalTimeController.ResumeGlobalTime();
    24.         else
    25.             thisGlobalTimeController.PauseGlobalTime();
    26.     }
    27. }
    I hope that helps,

    Justin
     
    Last edited: May 20, 2014
  16. OzDave

    OzDave

    Joined:
    May 19, 2008
    Posts:
    144
    Hi Justin,

    I get an error with the example above on this line.

    Code (csharp):
    1.  
    2.  
    3. [SerializedField] SWP_TimeGlobalController thisGlobalTimeController;  
    4.  
    5.  
    Error : A namespace can only contain types and namespace declarations.


    If I look at the reference of the serialize command it appears there is no "d" within the structure but I am not sure after that of the errors meaning.

    http://docs.unity3d.com/Documentation/ScriptReference/SerializeField.html
     
  17. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Sorry. I just typed it straight from my ipad as I wasn't in the office. You are correct it should be without the d.
     
  18. OzDave

    OzDave

    Joined:
    May 19, 2008
    Posts:
    144
    Hi mate,

    after some fumbling around I got it ;)

    Cheers Ears!
     
    Last edited: May 20, 2014
  19. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Yes, sorry about that. I was typing out of my head outside the environment on my iPad, so I had some syntax errors :-/ Glad you managed to sort it out. I have amended my post with the correct "tested" code :)

    All the best,

    Justin
     
  20. OzDave

    OzDave

    Joined:
    May 19, 2008
    Posts:
    144
    I ran into an issue when applying it to the main project Justin.

    The global button also does not stop the water from wobbling as I assumed it would stop everything in its tracks and just resume it from there.

    It appears to stop all further physics from working after trying to return to the game... any ideas on that?

    Ok so it seems that I have to group my own if i want to use physics?
     

    Attached Files:

    Last edited: May 22, 2014
  21. OzDave

    OzDave

    Joined:
    May 19, 2008
    Posts:
    144
    Ncarter in the irc suggests I can freeze the physics with timeScale ?

    What scripting addition should I add to the previous one to make the physics just freeze until released?
     
  22. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Hello OzDave,

    I just send you an email about this. The global pause should pause everything - physics and all. I have ran a couple of tests and it pauses everything my end. Could you put together a quick and nasty demo so I can see where it is failing. It might be something that has been missed, but ultimately it will help me create a patch for you incase I need to.

    Thanks again,

    Justin
     
  23. OzDave

    OzDave

    Joined:
    May 19, 2008
    Posts:
    144
    Hi Justin,

    I put together a robust demo for you and spent some time reducing the graphics etc. but preserving the assets as well as marking a instructions sheet with what i did to get to this point and what happens.

    I linked it all up so you can see immediately the error.

    I will email you the link after this post.
     
  24. OzDave

    OzDave

    Joined:
    May 19, 2008
    Posts:
    144
    Any news on this issue Justin?
     
  25. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Hi ozDave,

    I have received your demo project thanks. I'm not in the office at weekends and it is a public holiday here today in the UK. I'll be able to look at it in the morning.

    Justin.
     
  26. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Other News

    I am preparing a new update which I just have to add a couple of things before release. This includes a whole host of things people have been asking for. I also just want to test this issue OzDave has asked me to look into I case this needs a fix for.

    All the best,

    Justin
     
  27. OzDave

    OzDave

    Joined:
    May 19, 2008
    Posts:
    144
    No worries Justin.
    Cheers mate!
     
  28. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Hello ozDave,

    I've been looking at your project. When I run it I am getting a lot of index out of range errors with your water object which is causing the program flow to not work correctly. The error it is producing is to do with the water audio.

    Justin
     
  29. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Hi ozDave,

    I'm emailing you some updated files for your project. Let me know how you get on.

    Justin
     
  30. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Hello SilentSlack,

    I have been looking into your HOTween issue with the time controller. I have download the latest version and it seems to be working fine.

    Are you able to send me a very basic scene for me to look at for you? And/or send me the steps to recreate the problem and I'll take a look.

    All the best,

    Justin
     
  31. OzDave

    OzDave

    Joined:
    May 19, 2008
    Posts:
    144
    Hi Justin,
    all sorted. thanks heaps mate!
     
  32. Phil-363

    Phil-363

    Joined:
    Jun 5, 2014
    Posts:
    4


    After installation, lot error occurred playmaker part (error CS0246, CS0104), How can I fix it?

    Unity v4.5.0f6
    PlayMaker v1.7.7.f6
    Time Control and Pause Kit v2.1
     
    Last edited: Jun 5, 2014
  33. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    That's strange. Maybe it is a 4.5 thing I'll have to take a look. It looks like the TimeController cannot find any of the Playmaker assemblies. Can you try to re-import Playmaker into your project and restart unity.

    Justin
     
  34. Phil-363

    Phil-363

    Joined:
    Jun 5, 2014
    Posts:
    4
    I have tried to re-import playmaker, but the problem is still the same.

    I even created a new, clean project, still get the same results. :(
     
  35. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Hi Phil,

    Can you email me over the clean project and I'll see what the problem is. Sounds like something introduced in 4.5, but I'll get it sorted for you.

    Justin
     
  36. Phil-363

    Phil-363

    Joined:
    Jun 5, 2014
    Posts:
    4
    I have sent to your support@... mail
    hope you can find a solution, thank you!
     
  37. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Thanks Phil - all received. I'll check it out when I'm back in the office on Monday.

    Have a good weekend,

    Justin
     
    Phil-363 likes this.
  38. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Hi Phil,

    All sorted. The file you sent me opens perfectly in 4.3. No idea why the errors are flagging up in 4.5, the funny thing is that is you open your project in 4.3 and then open exactly the same project afterwards in 4.5 you get no more errors. Flipping strange if you ask me.

    I have emailed you over the working project, but all I did was first open in 4.3 and then in 4.5.

    Any problems just let me know.

    Justin
     
  39. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    PLAYMAKER USERS,

    Just read in the Playmaker topic that the Playmaker tooltip attribute is causing issues with the new Unity 4.5 Tooltip attribute. So, anyone using Playmaker with 3rd party assets will get errors with:

    Code (csharp):
    1. [Tooltip("bla bla bla")]
    You should replace these lines with:

    Code (csharp):
    1. [HutongGames.PlayMaker.Tooltip("bla bla bla")]
    I hope this makes sense and I'll make these changes hard coded in the next release.

    All the best and happy coding,

    Justin
     
  40. Phil-363

    Phil-363

    Joined:
    Jun 5, 2014
    Posts:
    4
    wow, change tooltip it's work fine!!
    so eager to help us solve the problem, thank you Justin!!
    5 stars!:)
     
    SketchWork likes this.
  41. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254

    Version History

    Version 2.2
    Added support for Unity 4.5.
    Added support for RigidBody2D for pausing and resuming.
    Fixed problem where pausing failed on certain Unity versions.
    Fixed issue with Playmaker Tooktip causing errors with the new Unity Tooltip Attribute.

    Version 2.1
    Tidied Up the editors a little.
    Fixed issue with ToggleLeft on some versions of Unity 4.

    Version 2.0
    New “Global Pause/Resume Control” script and prefab.
    PLAYMAKER integration (Custom Actions and Custom Events).
    HOTween support.
    iTween support.
    2D Platform Controller support.
    2D Toolkit support.
    Added template system for easy integration with other current and future 3rd party assets.
    Added support for Unity 4.3.

    Version 1.1
    Fixed bug with legacy animations when not using the default clip.
    Added support for Unity 3.5 and Unity 4+.
    Updated support email details.

    Version 1.0
    Initial release.

    Asset Store Link: "Get the Time Control and Pause Kit".
     
  42. desmondkiu

    desmondkiu

    Joined:
    Jul 22, 2014
    Posts:
    1
    Before I buy this for my project, there are a few questions I need answered.

    1) Is it possible to separately control timescale for each individual game object?
    2) How much fine-grained control do I have?
    e.g. Can I set enemy1 update timescale to 0.1, particle system time scale to 0.2, animation timescale to 0.3,
    enemy2 update timescale to 0.4, particle system time scale to 0.5, animation timescale to 0.6,
    player update timescale to 0.7, particle system timescale to 0.8, animation timescale to 0.9?
     
  43. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Hello desmondkiu,

    1) Yes, you can control any number of time controls for different gameobjects.

    2) Yes, you can fine control any of the times. They are represented in a percentage form so you can have your different objects running at individual speeds (1%, 2%, etc.).

    What kind of objects are you wanting to control?

    All the best,

    Justin
     
  44. Mwied

    Mwied

    Joined:
    Jul 16, 2014
    Posts:
    2
    Hi Justin
    I'm about to get this product, Before i do can you please confirm: that i will be able to freeze a group of gameobjects in mid-air while they are falling to the ground influenced by gravity from ridgidbody in a 3D envirament using PlayMaker... and resume that process when needed. :)

    Thanks / MIkkel
     
  45. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    @Mwied. Yes, I can confirm that you can freeze your falling objects :)
     
  46. Banky

    Banky

    Joined:
    Sep 10, 2014
    Posts:
    24
    Hi Justin,

    First of all, thanks for this great plugin!

    I have a problem with 2d Toolkit and the Pause Group Time. I have created a group with a 2DPC Controller, a 2d toolkit sprite and other components. The Pause Works great for all the elements except for 2dToolkit sprites, they just keep moving. I have tried with the standard script and also with the 2dToolkit script, but none of them works. The sprites just keep moving.

    PauseGlobal is working OK for 2dToolkit sprites.

    Any ideas?

    Thanks!
     
  47. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Hello Banky,

    I just sent you a quick email/PM.

    Don't worry we'll get it working for you.

    Justin
     
  48. Banky

    Banky

    Joined:
    Sep 10, 2014
    Posts:
    24
    Hi Justin,

    Thanks, I got your PM, but it's working now. It was just a silly mistake I made :p

    Sometimes, sleep can help I guess :)

    Thanks again for your help and for this great plugin!
     
  49. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Awesome. Glad you sorted it out :D

    Justin
     
  50. fmarkus

    fmarkus

    Joined:
    May 22, 2010
    Posts:
    181
    Hello, just got the plugin but not sure I understand how to do what I want:
    I want to pause everything in the level but the pause object and it's children.
    How do I do that? TimeGroupController and I have to put everything in the scene but the pause object in the group?
    Thanks for the help!