Search Unity

HOTween: a fast and powerful Unity tween engine

Discussion in 'Assets and Asset Store' started by Demigiant, Jan 7, 2012.

  1. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    @Le nain: oops, gonna check that later.

    @Dávid Debnár: that is a known bug, RestartIncremental is still alpha. Gonna check that later too :)
     
  2. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    New Update v1.3.100

    - RestartIncremental now works correctly with Quaternions and Rewinds
    - Fixed a bug caused by Unity, where TimeScaleIndependentUpdate tweens created in the first frame didn't work correctly with delays

    As usual, latest version is on the website.

    @Le nain: fixed. It's apparently a new but not-so-new Unity bug, where Time.realtimeSinceStartup returns a random (!!!) number when called in the first frame.

    @Dávid Debnár: fixed, but still needs more tests. Please get the latest version and let me know if everything works correctly for you.
     
  3. Le-nain

    Le-nain

    Joined:
    Nov 26, 2012
    Posts:
    62
    Thanks man, looks like it's working fine now.

    Also, another thing I came across; I mainly wanna know if it's working as intended or not, and if so, the reason behind it: I tried making some UI with some of the tweens managed by HOTween, and found a bit annoying that eventhough a gameobject is SetActive(false); its tweens are still played.
    I can imagine coding-wise the reason: it seems the engine is not storing anything on the GO itself, rather have a manager handle them all. Though, I thought it could still automatically Pause the related tweens, using some events.

    Again, as many of my questions, it's no big deal, I worked around by manually enabling/disabling all the Tweeners that are children of a given popup when I Display/Hide it, though I admit I got used to NGUI's tweens handling that by themselves :D
     
  4. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    That's indeed intended behaviour, as you imagined :) NGUI is tightly connected to gameObjects, so it can "know" when one is active or not, and decide to behave consequently. HOTween on the contrary is more generic and not tied to gameObjects only, so while it allows to tween everything, it has no idea if that everything is part of a gameObject or not, and thus doesn't take into consideration active/enabled states.
     
  5. famadori

    famadori

    Joined:
    May 6, 2014
    Posts:
    2
    Good night,

    I was using the version available in HotWeen Assets Store version 1.3.035 and was working perfectly in the unity editor.

    HOTween.To(this.volume.GetComponent<tk2dCameraAnchor>(), 2, new TweenParms().Prop("AnchorOffsetPixels", new Vector2(150, 50)));

    When I generated the Windows Phone project had a problem and realized that there was a new version on the HotWeen 1.3.100 micro site that supported the WP8. Updating she started having the following problem.

    InvalidCastException: Cannot cast from source type to destination type.
    Holoville.HOTween.Plugins.Core.ABSTweenPlugin.SetUndefinedValue (System.Object p_value) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Plugins/Core/ABSTweenPlugin.cs:697)
    Holoville.HOTween.Plugins.Core.ABSTweenPlugin.SetValue (Vector3 p_value) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Plugins/Core/ABSTweenPlugin.cs:595)
    Holoville.HOTween.Plugins.Core.PlugVector2.DoUpdate (Single p_totElapsed) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Plugins/Core/PlugVector2.cs:232)
    Holoville.HOTween.Plugins.Core.ABSTweenPlugin.Update (Single p_totElapsed) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Plugins/Core/ABSTweenPlugin.cs:469)
    Holoville.HOTween.Tweener.Update (Single p_shortElapsed, Boolean p_forceUpdate, Boolean p_isStartupIteration, Boolean p_ignoreCallbacks, Boolean p_ignoreDelay) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Tweener.cs:832)
    Holoville.HOTween.Tweener.Update (Single p_shortElapsed, Boolean p_forceUpdate, Boolean p_isStartupIteration, Boolean p_ignoreCallbacks) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Tweener.cs:698)
    Holoville.HOTween.Core.ABSTweenComponent.Update (Single p_elapsed) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Core/ABSTweenComponent.cs:954)
    Holoville.HOTween.HOTween.DoUpdate (UpdateType p_updateType, Single p_elapsed) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/HOTween.cs:2246)
    Holoville.HOTween.HOTween.Update () (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/HOTween.cs:728)


    I put the normal version of HotWeen 1.3.100 and got the same problem. The only working version is 1.3.035, however needed to support this new WP8. Can you help me?

    thank you
     
  6. renattou

    renattou

    Joined:
    Dec 14, 2012
    Posts:
    5
    I'm migrating from iTween to HOTween and I must say that I'm loving it.

    During one of the changes I noticed some strange behaviour with HOTween's EaseOutElastic (the results were different from iTween). Then I tried using the amplitude and period parameters. I was able to get it right passing 0.0f to these parameters. I think that it might be a bug, because ignoring these parameters should pass 0.0f as default (according to source code).

    Here's a script to demostrate the strange behaviour. For some reason fieldName1 is starting with 0.354425f instead of 0.0f.
    Code (csharp):
    1. public float fieldName1 = 0.0f;
    2. public float fieldName2 = 0.0f;
    3.  
    4. private void Start()
    5. {
    6.     HOTween.To(this, 2.0f, new TweenParms().Prop("fieldName1", 1.0f).Ease(EaseType.EaseOutElastic).OnUpdate(PrintValues));
    7.     HOTween.To(this, 2.0f, new TweenParms().Prop("fieldName2", 1.0f).Ease(EaseType.EaseOutElastic, 0.0f, 0.0f).OnUpdate(PrintValues));
    8. }
    9.  
    10. private void PrintValues()
    11. {
    12.     print("Field 1: " + fieldName1);
    13.     print("Field 2: " + fieldName2);
    14. }
     
  7. divzero

    divzero

    Joined:
    Jun 1, 2014
    Posts:
    5
    Hi Izitmee
    (cool name btw)

    HOTween is awesome!! I can see I'm going to love working with it.

    One question though - how to I get rounder corners from PlugVector3Path? (using PathType.Curved naturally). The curved path is round, but it can be pretty tight (not very round) around sharp corners.
    E.g.: you are tweening position via PlugVector3Path from point A to B to C, but the angle ABC is very sharp (about 30 degrees); then the curved tween path is pretty sharp.

    I need nice big and round corners.

    Any advice?

    Thanks!
     
  8. Gucci Gagan

    Gucci Gagan

    Joined:
    Mar 28, 2013
    Posts:
    3
    Im having issues with Hotween and Ngui. Im trying to Tween the position of a sprite. I tested it in an empty project and it works fine with cubes but as soon as i create an NGUI sprite, it automatically creates the following hierarchy
    UIRoot -- Camera -- Sprite
    And when i run the following code

    Code (CSharp):
    1. HOTween.To(LeftPoint, 1, new TweenParms().Prop("position", new Vector3(0,70,0)));
    The sprite jumps to the position 2345, 23000, 0.
     
  9. Nimrod-Harel

    Nimrod-Harel

    Joined:
    Jun 3, 2014
    Posts:
    1
    Hey, I want to dynamically set an object to move (tween) between points A->B, and then from B->C.
    Can I chain HOTween.To() or use a sequence for that purpose?

    Note: I do not want to use "onComplete" and than preform next tween, because it will require keeping additional info (point C) on the object and will add lots of complexity to my code.

    Thanks, and awesome work with the package !
     
  10. Spikeh

    Spikeh

    Joined:
    Jun 7, 2013
    Posts:
    24
    Hey @Izitmee,

    This is more of an observation than anything, but you may be able to explain why its happening. I'm tweening the fontSize property of a TextMesh component as follows:

    _deviceNameTween = HOTween.To(DeviceNameMesh, _mouseOverFontTweenSpeed, new TweenParms()
    .Prop("fontSize", _fontSizeMouseOut)
    .Ease(_mouseOverFontEaseType));

    While the tween is taking place, the framerate drops to around 40FPS (from an average of about 200FPS). I know TextMesh components are a bit limited, and was probably going to change it at some point anyway, but I wondered if you knew why this happens?
     
  11. divzero

    divzero

    Joined:
    Jun 1, 2014
    Posts:
    5
    Hi Nimrod Harel

    I'm in the same boat as you are.

    From what I can see, your options are:
    ** If you know where point C is up front
    1) then create a single HOTween.to, making use of the PlugVector3Path and set your path as A,B,C.
    or
    2) create a Sequence object, and add two tweens to it. (assuming you are on point A), tweening to B, and then one tweeing to point C.

    ** If you DO NOT know where point C is up front, and you only calculate point C when you reach point B, then:
    1) use a single HOTween.to, and an onComplete, where you calculate point C, and add a new HOTween.to which will take you to point C.

    If you are using curved paths, you have to be aware that transitioning from one tween into the next (either via onComnplete method, or via two tweens in a Sequence object) will not preserve the curving - you will get a sharp turn into the next tween... (which sucks) this is where I'm stuck atm... I have some other more complicated method I trying atm. PM me if you want to chat.
     
  12. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Hi,

    sorry but with the new Unity forums I didn't get any mail about new posts. I'm in a rush now, but will answer everything tomorrow when I come back.
     
  13. Ox_

    Ox_

    Joined:
    Jun 9, 2013
    Posts:
    93
    Hi!

    I moved to HOTweenMicro from HOTween because of VerificationException but now I'm getting this one on game start:
    Code (CSharp):
    1. InvalidCastException: Cannot cast from source type to destination type.
    2. Holoville.HOTween.Plugins.Core.ABSTweenPlugin.SetUndefinedValue (System.Object p_value) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Plugins/Core/ABSTweenPlugin.cs:666)
    3. Holoville.HOTween.Plugins.Core.ABSTweenPlugin.SetValue (Vector3 p_value) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Plugins/Core/ABSTweenPlugin.cs:595)
    4. Holoville.HOTween.Plugins.Core.PlugVector2.DoUpdate (Single p_totElapsed) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Plugins/Core/PlugVector2.cs:232)
    5. Holoville.HOTween.Plugins.Core.ABSTweenPlugin.Update (Single p_totElapsed) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Plugins/Core/ABSTweenPlugin.cs:469)
    6. Holoville.HOTween.Tweener.Update (Single p_shortElapsed, Boolean p_forceUpdate, Boolean p_isStartupIteration, Boolean p_ignoreCallbacks, Boolean p_ignoreDelay) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Tweener.cs:832)
    7. Holoville.HOTween.Tweener.Update (Single p_shortElapsed, Boolean p_forceUpdate, Boolean p_isStartupIteration, Boolean p_ignoreCallbacks) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Tweener.cs:698)
    8. Holoville.HOTween.Core.ABSTweenComponent.Update (Single p_elapsed) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Core/ABSTweenComponent.cs:954)
    9. Holoville.HOTween.HOTween.DoUpdate (UpdateType p_updateType, Single p_elapsed) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/HOTween.cs:2246)
    10. Holoville.HOTween.HOTween.Update () (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/HOTween.cs:728)
     
  14. IvanVI

    IvanVI

    Joined:
    Feb 17, 2014
    Posts:
    5
    Hello.

    First of all. HOTween great tool. Thx! :)

    Then questions.

    1. Is it possible to make a Sequence that run two tweens at the same time? I need to rotate around (360) two objects and get only one message OnComplete

    1.1 Or how to tween array or list of objects? Smth like to pass to HOTween.To() an array of gameobjects instead of single target.

    2. Is it possible to start second tween in Sequence before end of previous one ? And I need to configure value of this overlap?

    Thanks.
     
  15. divzero

    divzero

    Joined:
    Jun 1, 2014
    Posts:
    5
    Hi IvanVI

    1. Yes, I believe you can. Create a sequence, and add two tweens to it via Sequence.Insert(time, tween):
    mySequence.Insert(time1, HOTween.To(...));
    mySequence.Insert(time2, HOTween.To(...));
    You can make time1 and time2 the same or zero I guess.

    You then add a. OnComplete onto the sequence via the SequenceParms() when you create the sequence:
    mySequence = new Sequence(new SequenceParms().OnComplete(MyFunction));

    Or, you can probably do something like this - multiple props on one tween, though it only works on one target (from the HOTween docs):
    mySequence.Insert(1, HOTween.To(myGameObject1.transform, 1, new TweenParms().Prop("position", new Vector3(10,20,30)).Prop("rotation", new Vector3(0,720,0)).Prop("localScale", new Vector3(4,4,4)).Ease(EaseType.easeOutBounce)));

    You can also use Sequence.InsertCallback(time, params) to get an arbitrary callback at a specific time.

    1.1. Probably will need a Sequence and create one tween for each obj, and add the tweens to the Sequence via mySequence.Insert(0.0f, HOTween.To(...)) so they all start at zero.

    2. See 1.1, and just change the start time for the second tween.

    I haven't tested any of this - just read the docs: http://hotween.demigiant.com/documentation.html#sequence
     
  16. IvanVI

    IvanVI

    Joined:
    Feb 17, 2014
    Posts:
    5
    Thanks. Make sense.
     
  17. MrFoamy

    MrFoamy

    Joined:
    Jan 7, 2013
    Posts:
    8
    Is it possible to find the times a Vector3Path tween will pass through each way-point? That or to find the distance between way-points on a curved path?

    I need to produce a rotation sequence that syncs with the way-points but I don't have the times between them to do it.

    Thanks
     
  18. DavidDebnar

    DavidDebnar

    Joined:
    Mar 19, 2011
    Posts:
    115
    Hello! It's me again! I think I broke HOTween once again :(. I'm writing a custom inspector for HOTween (which, imo, is better than the one already available, because it supports sequences. i'll share when it's ready ;)), but I ran into issues with 'empty' sequences.

    Simple example:

    Code (CSharp):
    1. Sequence sequence = new Sequence (new SequenceParms ().AutoKill (false));
    2. sequence.AppendCallback (() => Debug.Log(Time.time));      
    3.  
    4. Sequence controller = new Sequence ();
    5. controller.AppendInterval (2);
    6. controller.AppendCallback (() => sequence.GoToAndPlay (0));
    7. controller.AppendInterval (1);
    8. controller.AppendCallback (() => sequence.GoToAndPlay (0));
    9.  
    10. controller.Play ();
    In this example, the first sequence' callback only gets called once.


    A more drastic example (which I'd love to work):

    Code (CSharp):
    1. Sequence sequence = new Sequence ();
    2. sequence.AppendCallback (() => Debug.Log (Time.time));
    3. sequence.AppendCallback (() => sequence.Pause ());
    4. sequence.AppendCallback (() => Debug.Log (Time.time));
    5. sequence.AppendCallback (() => sequence.Pause ());
    A self-pausing sequence! I came up with this when playing with my HOTween inspector as it's a great way to call different things. For example, lets say I'd have an NPC with 3 speech options, when I'd interact with it, it'd say the first one and then pause, when I'd interact a second time, it'd unpause the sequence, hence playing the second dialogue option.

    I hope I didn't cause many troubles :rolleyes:

    David
     
  19. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    Dear Daniele,

    I cannot understand how can I create a new Tweener without run instantianely using .Play() ...

    I see your example and you use .Play() just with sequence but I don't need to create a sequence,

    I want just record my tweener into Manager and then play and pause it when I need.

    Can you help me?
    PS: (I m italian)

    Thanks
     
  20. DavidDebnar

    DavidDebnar

    Joined:
    Mar 19, 2011
    Posts:
    115
    Hey! I'm not Daniele, but I think I can help you anyways ;). From what I understand, you want to create a Tweener, not play it and then play it on demand later on. You can achieve this via TweenParms - the Pause function to be precise.

    Code (CSharp):
    1. Tweener tweener = HOTween.To (transform, 1, new TweenParms ().Prop ("position", Vector3.zero).Pause ());
     
  21. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    Thanks for your reply.

    I found this solution last minutes and I think it is the right way :)
     
  22. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Is there a way to stop all the tweens that are running on a specific target?

    I have several different tweens running on a button; when the user presses the button, all the tweens need to immediately stop and start over from scratch. I know I can store references to the tweens and use those, but this is something I'll be replicating over a large number of different objects, so I'd much rather simply detect what tweens, if any, are running on an object and then stop them that way.
     
  23. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Sorry for the delay guys, and thanks a lot @Dávid Debnár and @divzero for the help :)

    Here we go:

    @famadori: Unity 4.5 introduced a new issue with the Microsoft Store. Check here for the possible reasons and the solution.

    @engrato: glad you like it :) That elastic ease thing is strange behaviour indeed. Will check it out after answering here.

    @divzero: thanks! :) Path uses a fixed algorithm for calculation of corners, so the only way to make those corners rounder would be to add more waypoints. I always suggest Simple Waypoint System by @Baroni when wanting to work more visually with paths: it uses HOTween internally and is pretty awesome.

    @Gucci Gagan: NGUI should work with no problems with HOTween (many people use both of them). The problem in your case might be that NGUI is starting an internal tween too?

    @Nimrod Harel: thanks :) And you can indeed use a Sequence for what you have in mind. That's one of their main usage.

    @Spikeh: as far as I know, each time you change the size (or even the content) of a TextMesh, a lot of stuff needs to be reinitialized (I don't know the exact details though, since I always use 2D Toolkit for texts — which still needs to reinitialize various stuff in case of changes, but less). So if you're using HOTween to change that at every frame, that's why your frames are dropping.

    @Ox_: are you using the latest version? If so, can you write me the code you're using to create the tween, and what type of property are you tweening?

    @Dávid Debnár: that is great and awesome! And I love the self-pausing logic :) About the empty Sequences issue, could you post a test package that I can use to verify and fix that? I know I could do that myself, but I'm reeeeally stumped by tons of things in these days.

    @BeeZee: sure, HOTween.Pause has varoous overloads, and one of them accepts a target as a parameter, which will pause all tweens on said target.
     
  24. DavidDebnar

    DavidDebnar

    Joined:
    Mar 19, 2011
    Posts:
    115
    Sure thing! - Here you go :)
     

    Attached Files:

  25. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    Thanks for this awesome plugin...

    Built for windows store and I am getting these three errors, somehow the build process completes, and I still need to check whether it works once inside VS but just wanted to share this.

    I am using hotween micro.


    Reference Rewriter: Error: method `System.Reflection.MethodInfo System.Reflection.PropertyInfo::GetGetMethod()` doesn't exist in target framework. It is referenced from HOTween.dll at System.Object Holoville.HOTween.Plugins.Core.ABSTweenPlugin::GetValue().

    UnityEngine.Debug:LogError(Object)
    PostProcessMetroPlayer:RunReferenceRewriter(MetroSDK, String, String, String, String) (at C:/BuildAgent/work/aeedb04a1292f85a/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessMetroPlayer.cs:438)
    PostProcessMetroPlayer:postProcessSDKSpecific(MetroSDK, BuildTarget, BuildOptions, String, String, ProjectImages) (at C:/BuildAgent/work/aeedb04a1292f85a/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessMetroPlayer.cs:806)
    PostProcessMetroPlayer:postProcess(BuildTarget, BuildOptions, String, String, String, String) (at C:/BuildAgent/work/aeedb04a1292f85a/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessMetroPlayer.cs:636)
    UnityEditor.PostprocessBuildPlayer:postprocess(BuildTarget, String, String, String, Int32, Int32, String, String, BuildOptions, RuntimeClassRegistry)

    Reference Rewriter: Error: method `System.Reflection.PropertyInfo System.Type::GetProperty(System.String)` doesn't exist in target framework. It is referenced from HOTween.dll at System.Void Holoville.HOTween.TweenParms::InitializeObject(Holoville.HOTween.Tweener,System.Object).

    UnityEngine.Debug:LogError(Object)
    PostProcessMetroPlayer:RunReferenceRewriter(MetroSDK, String, String, String, String) (at C:/BuildAgent/work/aeedb04a1292f85a/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessMetroPlayer.cs:438)
    PostProcessMetroPlayer:postProcessSDKSpecific(MetroSDK, BuildTarget, BuildOptions, String, String, ProjectImages) (at C:/BuildAgent/work/aeedb04a1292f85a/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessMetroPlayer.cs:806)
    PostProcessMetroPlayer:postProcess(BuildTarget, BuildOptions, String, String, String, String) (at C:/BuildAgent/work/aeedb04a1292f85a/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessMetroPlayer.cs:636)
    UnityEditor.PostprocessBuildPlayer:postprocess(BuildTarget, String, String, String, Int32, Int32, String, String, BuildOptions, RuntimeClassRegistry)


    Reference Rewriter: Error: method `System.Reflection.FieldInfo System.Type::GetField(System.String)` doesn't exist in target framework. It is referenced from HOTween.dll at System.Void Holoville.HOTween.TweenParms::InitializeObject(Holoville.HOTween.Tweener,System.Object).

    UnityEngine.Debug:LogError(Object)
    PostProcessMetroPlayer:RunReferenceRewriter(MetroSDK, String, String, String, String) (at C:/BuildAgent/work/aeedb04a1292f85a/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessMetroPlayer.cs:438)
    PostProcessMetroPlayer:postProcessSDKSpecific(MetroSDK, BuildTarget, BuildOptions, String, String, ProjectImages) (at C:/BuildAgent/work/aeedb04a1292f85a/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessMetroPlayer.cs:806)
    PostProcessMetroPlayer:postProcess(BuildTarget, BuildOptions, String, String, String, String) (at C:/BuildAgent/work/aeedb04a1292f85a/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessMetroPlayer.cs:636)
    UnityEditor.PostprocessBuildPlayer:postprocess(BuildTarget, String, String, String, Int32, Int32, String, String, BuildOptions, RuntimeClassRegistry)
     
  26. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    @Dávid Debnár Aaagh the forums are still not sending me mail notifications. I would've had time today to check your example out. Will try to get on it tomorrow :)

    @gegagome Thanks for the info. It's a known issue, which for now was solved here
     
  27. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    Thanks for the link, I will check it out... In one of my scenes I am now getting these errors:
    HOTween : PlugColor is overwriting PlugColor for J-Graphic(Clone) (tk2dSprite).color
    UnityEngine.Debug:LogWarning(Object)
    Holoville.HOTween.Core.TweenWarning:Log(String, Boolean) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Core/TweenWarning.cs:48)
    Holoville.HOTween.Core.TweenWarning:Log(String) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Core/TweenWarning.cs:37)
    Holoville.HOTween.Core.OverwriteManager:AddTween(Tweener) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Core/OverwriteManager.cs:94)
    Holoville.HOTween.Tweener:OnStart() (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Tweener.cs:1046)
    Holoville.HOTween.Tweener:Update(Single, Boolean, Boolean, Boolean, Boolean) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Tweener.cs:795)
    Holoville.HOTween.Tweener:Update(Single, Boolean, Boolean, Boolean) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Tweener.cs:684)
    Holoville.HOTween.Core.ABSTweenComponent:Update(Single) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Core/ABSTweenComponent.cs:954)
    Holoville.HOTween.HOTween:DoUpdate(UpdateType, Single) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/HOTween.cs:2173)
    Holoville.HOTween.HOTween:Update() (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/HOTween.cs:728)


    The logic seems to be ok and I didn't use to have this problem before.

    Thanks
     
  28. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Thanks for the response!

    Another question: if a tween is set to EaseOutBounce, how do you tone down the bounce at the end so it's more subtle?
     
  29. jordi.mas

    jordi.mas

    Joined:
    Feb 6, 2014
    Posts:
    2
    Hello,

    I'm trying to do my first game, a race car game. The main library that I use is Simple Waypoint System based on HOTween and works very well. But in the circuit there are some loopings (See linked images Kart_looping_1.png) and when I try run it starts in the inner, slowly rotates in the Z axis and in the middle of the looping the car is in the outer of the looping (See the linked images Kart_looping_2.png). I talked with the developer of the Simple Waypoint System he said that HOTween always tries to rotate your object face up. Is there some settings on HOTween for "disable" the rotation face up?
     

    Attached Files:

  30. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    @Dávid Debnár Check out the attached HOTween version. It fixes the empty sequence callback issues. About the self-pausing Sequence instead, I understand what you want there, but as of now it can't be done. Even if you call Pause, that doesn't immediately block all callbacks, but just prevents the Sequence to move on in time. So if callbacks happen all at the same timeframe they will all be called, even if you call Pause between one of them.

    @gegagome That is not an error, but HOTween's Overwrite Manager warning you that a tween is overwriting another tween, and that it's resolving it automatically by stopping the oldest one. Which simply means you have two tweens trying to run on the same property at the same time.

    @BeeZee You can't tone done easeOutBounce. But remember that if you want more control you can use AnimationCurves for easings.

    @jordi.mas Can you send me a sample project that reproduces this issue simply and clearly, so I can check it out?
     

    Attached Files:

  31. DavidDebnar

    DavidDebnar

    Joined:
    Mar 19, 2011
    Posts:
    115
    @Izitmee My second private HOTween version :3 Thanks a lot for fixing these bugs, it's amazing :). About the self-pausing sequences, I'll just add a setting 'Fix self-pausing sequences' which will use the trick shown in the package - add tiny delays between callbacks to stop HOTween from running through them in it's amazing speed ;).
     
  32. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Ahahah :D About the self-pausing trick, consider that it might be tricky. The thing is, that callbacks would need NOT to happen in the same frame. So if for example you place a self-pause and then a 0.1" interval, normally the next callback wouldn't be called. But if for some reason the application is playing at 10fps, and thus the first tween callback will comprise a while 0.1 seconds of time, the next callback will be considered as happening right along with the pause.
     
  33. DavidDebnar

    DavidDebnar

    Joined:
    Mar 19, 2011
    Posts:
    115
    Actually, I'm unsure how exactly the FixedUpdate UpdateType operates, but if it's stable, you could set the sequence to use that and the delays to either Time.fixedDeltaTime + a tiny number or Time.fixedDeltaTime * 2 (the latter seems more stable to me), but it feels like compromising, although who wouldn't compromise for the possibility of self-pausing sequences!
     
  34. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    FixedUpdate indeed operates differently, but we could say that it still works on "frame chunks", only those frames are not tied to the true framerate but "hidden", but yes, it is rather stable. Still, I'm afraid that compromising for self-pausing sequences would break all other types of sequences :p
     
  35. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Mhmm I had an idea though. What if you added an interval after each pause of, like, one full second, and then the "controller" used a GoToAndPlay(mySequence.position + 1)? Not sure if it would work perfectly, but might be worth a try.
     
  36. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    @jordi.mas Here you go. Download this new version of HOTween and it's fixed.

    HELP ME IN TESTING?
    The version of HOTween that you find attached changes the behaviour of PlugVector3Path, in case the Z axis is locked. This is done to allow objects that move on paths that loop over each other to stay correctly aligned (while before there was a bug). In theory, nothing should change in the projects where you're using PlugVector3Path (since probably jordi was the first one to use those type of loopings), but considering how delicate (and a pain in the ass) is PlugVector3Path, if any of you could update and see if everything still works the same it would be great :)
     

    Attached Files:

  37. MrFoamy

    MrFoamy

    Joined:
    Jan 7, 2013
    Posts:
    8
    Any word on this? Think my question got missed.

    I also have a new one, I may have missed something in the documentation but I'm experiencing a strange behaviour with tween sequences.

    Basically, I have a string of rotation tweens in a sequence, these play and then after the sequence completes a new set of position/rotation tweens are started by a different script (initiated by a callback). The issue is that it appears the sequence changes the rotation of the object at least once after the callback runs.

    So I reset the rotation to 0 during the callback, but then on the next update the rotation is back to the last value it had before the sequence ended. I've checked the "completed" flag and that shows it should be done. The issue is completely resolved if I clear or kill the sequence before the callback code runs. Could this be a bug?

    Thanks
     
  38. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    @MrFoamy Ooops sorry, I missed your question.

    About the first one, it can't be done for now, but I should be able to make a method that returns said data. I'm leaving at the beginning of next week, but I'll try to work on it around Thursday.

    About the second one, could you attach a sample barebone project that replicates this issue, so I can check it out and see what's happening?
     
  39. MrFoamy

    MrFoamy

    Joined:
    Jan 7, 2013
    Posts:
    8
    Thanks that would be fantastic!

    I'll try and replicate it in a new project tomorrow and update.
     
  40. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Hey @MrFoamy try the attached version instead (1.3.300). It should resolve the Sequence issue :) Let me know.
     

    Attached Files:

  41. MrFoamy

    MrFoamy

    Joined:
    Jan 7, 2013
    Posts:
    8
    I tried the version you just gave, unfortunately everything seems the same.

    Here's a minimal project that replicates the issue (using the provided HOTween files). There's a bool setting on the control script that determines if the sequence will be forcefully killed after completion.

    The script sets the cube rotation to 0, then sets up and runs a rotation sequence. The rotation is logged each update. The sequence has a callback that resets the rotation, and reports the completion state. There's an additional setting to reset the rotation on each update.

    If kill is not enabled then the cube rotates, and stops in the last position. The log shows that the position is reset, but then on the following update returns to its last rotation.

    If kill is enabled then the cube rotates, and then snaps back to zero rotation. The log shows that the position is reset and this value is held, although there is a HOTween error.

    The update reset option does not have any visible change of behaviour.
     

    Attached Files:

  42. jordi.mas

    jordi.mas

    Joined:
    Feb 6, 2014
    Posts:
    2
    Thank you for your attention!

    It works fine! :) Of course, I help you in testing!
     
  43. syawqy

    syawqy

    Joined:
    May 24, 2013
    Posts:
    1
    I am trying to use plugvector3path with orienttopath enabled in a sprite, but it facing wrong direction because its not 3d object, is it possible to do it with 2d object?
    I've tried to do it by storing last position of sprite every several seconds and then calculating angle between the last and current position to rotate the sprite according to that angle
    but I worried about performance here
     
  44. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    190
    Hi folks - I have an interesting dilemma - i thought i was going crazy but from what i can tell it's totally repeatable. lets say you add a tween to an object. then say this object has a child object, say it's a Cube, with a collider set to be a Trigger, and during the tween the parent (and child) passes through another static Cube object also with a collider.

    apparently the objects in question will pass right through each other but NO trigger (or collision) event will be called. i set up a dirt simple demonstration with an OnTriggerEnter function that would print something to the console and absolutely nothing happened.

    to verify i wasn't going crazy i dropped a similarly configured cube with Collider set to trigger on to another cube by adding a Rigidbody and the simple script and letting it fall on the start of the scene. this worked perfectly.

    so what gives here? is there something in tweeing in general that disables the Components of an object (and its children) being tweened?

    any answers appreciated. i'm obviously not getting something.
     
  45. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    NEW UPDATE: HOTween v1.3.320

    New Features
    • Added Is2D Method Parameter to PlugVector3Path
    Bugfixes
    • Fixed empty Sequences callback bug
    • Fixes for PlugVector3Path in case of Z axis lock
    • If a callback of a Sequence kills its own Sequence, it is correctly managed
    As usual, latest version is on the website.
     
  46. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    @jordi.mas Thanks for the testing. I'll reply your PM in a minute

    @MrFoamy This last update fixes the issue where killing a Sequence inside one of its callbacks generated an error. About your other issue, where resetting your target's value inside the last callback didn't work, that's due to HOTween's architecture. Until the Sequence is fully complete (or paused/killed) it will have full control on its targets (and the callbacks will always be called before the actual value changes, in script order). So if you want to reset its values when it ends, you'll have to use the OnComplete method parameter instead than a final callback.

    @syawqy Get the latest version and use the new Is2D method parameter (which needs to be chained to PlugVector3Path), which I added to manage objects in the new 2D coordinates (it comes with an optional parameter to tell HOTween if the 2D should be considered top-down or side-scrolling).

    @metaphysician OnTriggerEnter is called only if there's at least a RigidBody involved.
     
  47. adk172

    adk172

    Joined:
    Mar 16, 2014
    Posts:
    9
    hello folks, I have some issue in the installation of hottween, after unzipped everything in the Assets folder of my project I got a warning: "Unable to open Assets/Hotween/Hotween.dll.mdb: Check external application preferences" and the inspector says: "Window could not be loaded because the script is not found in the project", that's sound strange to me because actually the script is inside the project in fact mono is trying to compile it

    I'm pretty new to unity so probably is something stupid, I've always used packages and this is pretty different, any help will be appreciated, thanks
     
    Last edited: Jun 23, 2014
  48. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    @adk172 Never heard about this issue: did you copy/paste that message? Did you get the latest version from the website? On what OS are you? And what platform is your project set for?
     
  49. Crwth

    Crwth

    Joined:
    Mar 1, 2014
    Posts:
    6
    Care to share how you solved your bug? I'm having the same problem; iOS, Windows Phone, Windows Store, all can't see the Hotween.dll .


     
  50. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    See the previous post he made immediately before that one :)