Search Unity

DOTween (HOTween v2), a Unity tween engine

Discussion in 'Assets and Asset Store' started by Demigiant, Aug 5, 2014.

  1. Vincent_Stagg

    Vincent_Stagg

    Joined:
    Jul 3, 2019
    Posts:
    13
    Ok I am still pretty new to unity as although I signed up in 2019 I've only been practicing/learning unity for about 4 or 5 months now, maybe I'm misunderstanding how this all works but if you see the image if I already have a plugins folder or other folder by the same name when I go to install another asset it gives me the warning and will overwrite the folder if installed?
     

    Attached Files:

  2. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    217
    This isn't based on Unity, it is based on Folder structure on modern computers. And it shouldn't be telling you that it is overriding / overwriting anything, just saying that the folder already exists so it is modifying the existing one instead of adding a new one.

    Do a test -- does it actually override / overwrite anything?
     
    Vincent_Stagg likes this.
  3. FuguFirecracker

    FuguFirecracker

    Joined:
    Sep 20, 2011
    Posts:
    419
     
  4. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Hi @FreyaBlackthorn,
    What you are seeing in the screen capture you provided is indeed a exclamation on the Plugin-folder a it is already used by other assets. However everything that is marked with a green New will be added to the folder so it will not override any of the files and folders already in there. If you would see 2 arrows as an icon beside a file or folder that would indicate those would be overriden by the import.
    Hope this clarifies the meaning of the icons during import of a package, I'm sure this is somewhere documented by Unity as well.
     
    Vincent_Stagg likes this.
  5. Vincent_Stagg

    Vincent_Stagg

    Joined:
    Jul 3, 2019
    Posts:
    13
    Thank you, ah ok I get it now I thought that the plugin folder in the new asset would overwrite the one currently in the project adding the new items inside but deleting the old, I see now that it just adds the new assets items inside the plugin folder to the projects current plugin folder alongside the current items rather than overwriting them :)
     
  6. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    217
    I recommend setting up a version control software, like GitHub, so you can revert and rollback any changes as needed in case you do have problems in the future.
     
    Vincent_Stagg likes this.
  7. Vincent_Stagg

    Vincent_Stagg

    Joined:
    Jul 3, 2019
    Posts:
    13
    Thank you I will do that
     
  8. Morphus74

    Morphus74

    Joined:
    Jun 12, 2018
    Posts:
    174
    Anyone experience issue with ChangeEndValue and ChangeValue with Unity 2020?
    I've try contacting DemiGiant twice over the last 2 weeks, and never go an answer, which is quite unusual
     
  9. Crouching-Tuna

    Crouching-Tuna

    Joined:
    Apr 4, 2014
    Posts:
    82
    edit:
    NEVERMIND!! Updating fixed everything!
    Sorry!

    Hi all
    I have a very weird problem
    Basically, i edit some code, then save(compiles), enter editor Play mode, and the tween works normally, multiple times too
    Then i exit, enter Play mode again, and then now the tween doesnt work, and OnComplete doesn't get called
    I have to recompile again (even a // that does nothing) to make the tween work again (only for 1 playmode session)

    I thought it's a problem related to material instance being wrong or whatever. But i also tried the non tween approach (the SetColor that's commented in both Start and Destroy), and it works just fine in first and every play mode afterwards, like normal

    So, it's a problem with tween's DoFade

    I'm not sure what else to try to debug this..

    Cheers

    Code (CSharp):
    1.  
    2.     public override void StartEffect()
    3.     {
    4.         m_material = targetRenderer.sharedMaterial;
    5.         Debug.Log("Start: " + m_material.DOKill());
    6.  
    7.         Debug.Log("StartEffect " + m_material.name + tweenIn);
    8.         //m_material.SetColor(materialProperty, new Color(1, 1, 1, 1));
    9.         m_material.DOFade(1f, materialProperty, 1f).OnComplete(() =>
    10.         {
    11.             Debug.Log("Complete Start " + m_material.name);
    12.         });
    13.     }
    14.  
    15.     public override IEnumerator DestroyCo()
    16.     {
    17.         Debug.Log("Destroy: " + m_material.DOKill());
    18.  
    19.         //m_material.SetColor(materialProperty, new Color(1, 1, 1, 0));
    20.         tween = m_material.DOFade(0.1f, materialProperty, 1f).OnComplete(() =>
    21.         {
    22.             Debug.Log(m_material.name);
    23.             Destroy(gameObject);
    24.         });
    25.      
    26.         yield return null;
    27.     }
    28.  
     
    Last edited: Sep 4, 2020
  10. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Hi @Izitmee

    I want to use Sequences in an optimized way, but i dont see any methods for that.

    For example, on Awake i want to create a sequence object then append/insert in it and WAIT until i need it, i need a method like Stop() so it doesnt auto play;

    Then when i actually need to start, it i need to Reset it to default state in case its already running (like Killing). and then Start. So i couldnt find any method that does this?

    Please advise
     
  11. Rainland

    Rainland

    Joined:
    Sep 3, 2020
    Posts:
    2
    hello! I need some help.
    I am using DoText() to show a text content, but it became more and more slowly while showing the last words of a sentence, Although the total time seems to be correct.
    How can I fix it?
     
    Last edited: Sep 11, 2020
  12. flashframe

    flashframe

    Joined:
    Feb 10, 2015
    Posts:
    798
    Are you using a linear ease?

    Code (CSharp):
    1. .SetEase(Ease.Linear)
     
    Rainland likes this.
  13. OneFireFly

    OneFireFly

    Joined:
    Nov 1, 2015
    Posts:
    8
    I found a strange bug in DOTween PRO where the Animation script overlaps with other elements
    found in Unity 2019.4.10f1 and 2019.4.9f1
    upload_2020-9-11_20-19-22.png

    Steps to reproduce:
    - Install DOTweenPro v1.0.244
    - Create a 3D cube
    - add the DOTween Animation script
    - Press "Play All on GameObject" or "Play All in Scene"

    Hope it gets fixed. Thanks for your effort :)
     
  14. Rainland

    Rainland

    Joined:
    Sep 3, 2020
    Posts:
    2
    thanks, perfect!
     
    flashframe likes this.
  15. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Hi
    Is using sequences better than using tweens seperately?
     
  16. monsterrungame

    monsterrungame

    Joined:
    Sep 27, 2019
    Posts:
    15
    Hi, while using From method on any mobile devices an animated object doesn't finish at desired position. Animation stopping at random position.
     
  17. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    I think I have found that kill method doesnt seem to sometimes actually kill the tween...

    If I have OnComplete callback assigned and play the tween and then kill it before it completes, the callback sometimes gets called anyway...

    This is observable especially if I link it to say a keyboard input and rapidly press the key to kill the tween and then play again, the callback is supposed to be called only once for the latest tween but it does twice in different timing. I have reference to the tween that I created and the kills it just before creating the same tween on the same reference.

    Is this bug? Or expected behavior or am i mssing something?
     
  18. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    I did some more experiments and it seems like there is a bug in the Dotween kill system.

    If I do :

    DoTween.Kill(reference, false);\

    it still calls onCompelte

    But if I do :

    reference.Kill(false);

    it does not call the onComplete.
     
  19. IceTrooper

    IceTrooper

    Joined:
    Jul 19, 2015
    Posts:
    36
    DOTween Path component doesn't work? I don't see any waypoint and CTRL+SHIFT also doesn't create any.
    Unity 2019.4.11f1 with dark mode. Gizmos are turned on (I checked it). I created Waypoints from component list in Inspector and even then I don't see them.

    BTW: Is this forum still active? I see many questions asked before and any reply.
     
    Menion-Leah likes this.
  20. Crouching-Tuna

    Crouching-Tuna

    Joined:
    Apr 4, 2014
    Posts:
    82
    I don't seem to have rigidbody.DOMove. The Physics module is already enabled and all
    Am i missing something?
    On 1.2.420, Unity 2019.4.0f1
     
  21. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    Hi guys,

    I have a question about performance.

    Is it ok if I leave this running the entire length of a play session?
    Thanks for the help

    Code (CSharp):
    1.         gameObject.transform.DOLocalMove(10, 2).SetEase(Ease.Linear).SetLoops(-1, LoopType.Yoyo);
    2.  
     
  22. flashframe

    flashframe

    Joined:
    Feb 10, 2015
    Posts:
    798
    You might be better off contacting @demigiant on Twitter.

    If you've got multiple inspector windows open, it could be that. Try closing all the windows except one.
     
  23. cloud02468

    cloud02468

    Joined:
    Oct 7, 2020
    Posts:
    15
    Hi all,

    I am using Dotween free version, how can i move position waypoint in scene ?
     
  24. epicageofgamers

    epicageofgamers

    Joined:
    Jun 19, 2020
    Posts:
    2
    Hi
    I am using DOTween.Play("BombBlast"); for bomb scale animation if bomb collided to enemy.. but all bombs in my game are blasting by this id.. how can i play animation on collided bomb only?
     
  25. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,091
    Could you start compiling DOTween dlls targeting Net Standard 2.0? I see currently it's Framework 3.5 that won't be compatible with possible future Net5/Net Core Unity.

    NET Portability Analyzer shows 100% compatibility with net standard.
     
    jGate99 likes this.
  26. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    unfortunately this forum thread is abandoned by the plugin author.
     
  27. radoar

    radoar

    Joined:
    Sep 7, 2019
    Posts:
    1
    Hi.
    Application.logMessageReceived += HandleException;
    ...
    transform.DOScale(transform.localScale / 2, 1).OnComplete(() => { int u = 0; int i = 1 / u; });
    doesn't catch exceptions.
    what am I doing wrong ?
     
  28. Menion-Leah

    Menion-Leah

    Joined:
    Nov 5, 2014
    Posts:
    189
    Any luck with that? I'm experiencing the same exact issue, Unity 2019.4.10f1
     
  29. flashframe

    flashframe

    Joined:
    Feb 10, 2015
    Posts:
    798
    If you've got multiple inspector windows open, it could be that. Try closing all the windows except one.
     
  30. AlanGreyjoy

    AlanGreyjoy

    Joined:
    Jul 25, 2014
    Posts:
    192
    Code (CSharp):
    1. private void PlayWobble()
    2.         {
    3.             Debug.Log("Play wobble?");
    4.             transform.DOShakeScale(
    5.                 1f,
    6.                 1f,
    7.                 1,
    8.                 1f,
    9.                 true
    10.             );
    11.         }
    Nothing is happening... What am I doing wrong?
     
  31. AlanGreyjoy

    AlanGreyjoy

    Joined:
    Jul 25, 2014
    Posts:
    192
    Seriously? I just bought this thing... this is why I never buy assets.
     
    nobluff67 likes this.
  32. Menion-Leah

    Menion-Leah

    Joined:
    Nov 5, 2014
    Posts:
    189
    Thanks, but I already noticed that suggestion and nope, it's not my case.
     
  33. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    548
    Hello all people!

    I'm wondering if it is posible to do a DoPath over a list of waypoints but overriding the Y value of the transfrom along the path. I'm looking to tween an object but allways relative to the terrain floor. Thanks a lot!
     
  34. starfoxy

    starfoxy

    Joined:
    Apr 24, 2016
    Posts:
    184
    I am having the EXACT same issue. Did you ever solve this? Can anyone help?

    ---- edit -----

    Also, was able to test this issue using examples from here:

    http://dotween.demigiant.com/examples.php

    Same error. Appears that ABSTweenPlugin is somehow missing. I am using unity 2019.4.12f1 and most recent DoTween Pro asset.
     
    Last edited: Oct 25, 2020
  35. JoeFreshPlanet

    JoeFreshPlanet

    Joined:
    Jun 29, 2020
    Posts:
    3
    Hi Everyone,

    I was hoping to get some help with DOTween. For some reason I can't fathom, my sequences are forgetting the tweens I add to them.

    As per documentation, I am creating the sequence early on and then playing it later (in different frames). I add several scale tweens as a sequence (using a custom function to avoid writing ".append" over and over). When I use the debugger it shows that I've added the tweens to the sequence successfully. But then when it comes time to play(), looking at the debugger, the sequence is empty; it's forgotten all the tweens I added somehow.

    It's important to note that I am NOT altering the sequence whatsoever outside of the functions in my code below.

    This is really frustrating. Does anyone have advice?

    Here is a sample of my code (all on the same script):

    Code (CSharp):
    1.  
    2. Sequence highlightSequence;
    3.  
    4.     private void Awake()
    5.     {
    6.             highlightSequence = CreateSequence(new Tween[] {
    7.                 transform.DOScale(new Vector3(0.85f, 0.85f, 0.85f), FramesToSeconds(10)),
    8.                 transform.DOScale(new Vector3(1f, 1f, 1f), FramesToSeconds(10)),
    9.                 transform.DOScale(new Vector3(1.03f, 1.03f, 1.03f), FramesToSeconds(4)),
    10.                 transform.DOScale(new Vector3(1f, 1f, 1f), FramesToSeconds(8))
    11.             });
    12.     }
    13.  
    14. float FramesToSeconds(int frames) {
    15.         return frames / 60;
    16.     }
    17.  
    18.     Sequence CreateSequence(Tween[] tweens)
    19.     {
    20.         Sequence sequence = DOTween.Sequence();
    21.         for (int n = 0; n < tweens.Length; n++)
    22.         {
    23.             sequence.Append(tweens[n]);
    24.             Debug.Log("Appending tween " + tweens[n]);
    25.         }
    26.         return sequence;
    27.     }
    28.  
    29. void OnButtonPress() {
    30.      highlightSequence.Play();   //By the time it gets here, if I look at the sequence in the debugger, it has forgotten all its tweens
    31. }
    32.  
    33.  

    UPDATE:

    After some further experimentation, it would appear that the sequence is being emptied at the end of the frame. I thought the documentation said that we needed to set the sequence and play it in different frames?
     
    Last edited: Oct 26, 2020
  36. iMobCoding

    iMobCoding

    Joined:
    Feb 13, 2017
    Posts:
    165
    First, your FramesToSeconds function returns 0 in all calls you made, because frames are int and you're dividing them by int. So change it to return frames / 60.0f
    Second, if that still doesn't work, try pausing the sequence just after you created it.
    Also, if you intend to reuse that sequence for any reason, you should set its AutoKill to false
     
  37. JoeFreshPlanet

    JoeFreshPlanet

    Joined:
    Jun 29, 2020
    Posts:
    3
    I was just coming back to say I realized my goof with the FramesToSeconds() function. But I also didn't know about the autokill. Thank you for that!
     
    Last edited: Oct 26, 2020
  38. JoeFreshPlanet

    JoeFreshPlanet

    Joined:
    Jun 29, 2020
    Posts:
    3
    I'm still having issues getting this to work how I want. Now I can play the animation sequence, so long as I call a coroutine to do so:

    Code (CSharp):
    1.  
    2.      IEnumerator CreateTweenChainRoutine(Tween[] tweens) {
    3.         Sequence sequence = DOTween.Sequence();
    4.         sequence.Pause();
    5.         for (int n = 0; n < tweens.Length; n++)
    6.         {
    7.             sequence.Append(tweens[n]);
    8.         }
    9.  
    10.         yield return new WaitForEndOfFrame();
    11.         Debug.Log("Playing sequence");
    12.         sequence.Play();
    13.     }
    But I need to copy/paste this function into every single object in my game that uses animation.

    I tried moving the logic to a static class and passing the monobehavior instance, like so:

    Code (CSharp):
    1.  
    2.  
    3. public static PlayTweenChain(Tween[] tweens, Monobehavior instance) {
    4.       instance.StartCoroutine(CreateTweenChainRoutine(tweens));
    5. }
    6.  
    7. static IEnumerator CreateTweenChainRoutine(Tween[] tweens) {
    8.         Sequence sequence = DOTween.Sequence();
    9.         sequence.Pause();
    10.         for (int n = 0; n < tweens.Length; n++)
    11.         {
    12.             sequence.Append(tweens[n]);
    13.         }
    14.  
    15.         yield return new WaitForEndOfFrame();
    16.         Debug.Log("Playing sequence");
    17.         sequence.Play();
    18.     }
    But that doesn't seem to be working.

    I feel like what I'm trying to do is a fairly simple use case, and I must be over-thinking it.

    What is the easiest way to play a string of tweens in an object? Do I really need to copy/paste the same specialized coroutine function for playing Sequences into every script that uses animation? Does DOTween have no built-in functionality to accomplish this?
     
  39. neojsm2

    neojsm2

    Joined:
    Jun 27, 2017
    Posts:
    3
    DOJump(Vector3 endValue, float jumpPower, int numJumps, float duration, bool snapping)

    I am using 'DOJump' to move an object in a curve.
    My object moves towards the target object.
    Can I change Dojump 'endvalue' to target object location in real time?
     
  40. GerPronouncedGrr

    GerPronouncedGrr

    Joined:
    Mar 30, 2013
    Posts:
    25
    I'm trying to use DOTween to rotate a Cinemachine vCam when a button is pressed. It should rotate 90 degrees CW when one button is pressed, and 90 degrees CCW when a different button is pressed. My issue is that DORotate wants a Vector3 and transform.rotation is in Quaternions. I don't know how to convert this or if I can even use DOTween to directly modify transform.rotation.
     
  41. el_Guero

    el_Guero

    Joined:
    Sep 15, 2017
    Posts:
    185
    Is the myText.DOCounter(int fromValue, int toValue, float duration, bool addThousandsSeparator=true, CultureInfo culture=null) available for Playmaker?
     
  42. el_Guero

    el_Guero

    Joined:
    Sep 15, 2017
    Posts:
    185
  43. cloud02468

    cloud02468

    Joined:
    Oct 7, 2020
    Posts:
    15
    Hi, you mean this ?

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using DG.Tweening;
    5.  
    6. public class projectileMove : MonoBehaviour
    7. {
    8.     private Vector2 endPoint;
    9.  
    10.     public float jumpPower;
    11.     public GameObject impactEffect;
    12.  
    13.     character_move target;
    14.  
    15.     // Start is called before the first frame update
    16.     void Start()
    17.     {
    18.         target = GameObject.FindObjectOfType<character_move>();
    19.         endPoint.x = target.transform.position.x;
    20.         endPoint.y = target.transform.position.y - 2f;
    21.         this.transform.DOJump(endPoint, jumpPower, 1, 2f);
    22.     }
    23. }
     
    Last edited: Nov 5, 2020
  44. JosephOPossum

    JosephOPossum

    Joined:
    Dec 17, 2016
    Posts:
    4
    Howdy yall,
    I just recently got DOTween Pro, and I'm having some issues using the advertised TextMeshPRO integration.
    In my code, I have imported the DG.Tweening namespace:

    Code (CSharp):
    1. using DG.Tweening;
    ...And I'm using the example provided in the documentation:

    Code (CSharp):
    1. // Example 1 > Animate the scale of a single character
    2. DOTweenTMPAnimator animator = new DOTweenTMPAnimator(myTextMeshProTextField);
    3. Tween tween = animator.DOCharScale(characterIndex, scaleValue, duration)
    4.     .SetEase(Ease.OutBack);
    However, I'm getting :
    Code (CSharp):
    1. The type or namespace name 'DOTweenTMPAnimator' could not be found (are you missing a using directive or an assembly reference?)
    I didn't think there was any other setup, I've cleaned my codebase of all DOTween content and tried installing about 4 times now. Restarting Unity does nothing, restarting VSCode does nothing either.
    Oddly enough, I can see the class I need in the plugin hierarchy. I can also create Tweener and access the basic functionality. My project is having a hard time pulling the pro content, it seems.

    I only really got DOTween Pro for this functionality, I would really appreciate any help with this.
     
  45. JosephOPossum

    JosephOPossum

    Joined:
    Dec 17, 2016
    Posts:
    4
    Hey all, I found the solution to my issue. I needed to delete and regenerate my project's .sln file. Everything works as intended now!
     
  46. ShaunBartoo

    ShaunBartoo

    Joined:
    May 23, 2019
    Posts:
    3
    Hi, I'm getting an issue I hope someone can help me with. I'm inexperienced with lambda expressions so I feel like I'm probably just doing something dumb. This is the line in question:

    Code (CSharp):
    1. transform.DOMove(transform.position + new Vector3(xMove * GridManager.gridSize, 0, zMove * GridManager.gridSize), 1).onComplete(() => moving = false);
    I'm getting an error with onComplete(): Deligate 'TweenCallback' does not take 1 arguments

    Anyone have any idea whats going on? Thanks!

    edit: found the issue a few pages back. capital O on On was missing. Weird gotcha.
     
  47. iMobCoding

    iMobCoding

    Joined:
    Feb 13, 2017
    Posts:
    165
    Try OnComplete with capital O
    Also you’ll maybe need additional ; after moving = false

    Edit: Ah, I just saw your edit :)
     
  48. el_Guero

    el_Guero

    Joined:
    Sep 15, 2017
    Posts:
    185
    Can someone help me to resolve this code?

    Screen Shot 2020-11-16 at 22.37.13.png
    Thanks!
     
  49. jim00

    jim00

    Joined:
    Feb 1, 2015
    Posts:
    57
    I have problem finding more info about DOTween Pro Visual Manager. Beside this:

    Can someone tell me, what Visual Manager is and how to use it? Any doc, example, tutorial. thanks.
     
    Last edited: Nov 19, 2020
  50. atk_defender

    atk_defender

    Joined:
    Jun 26, 2018
    Posts:
    25
    How to write a combined move?
    I want my hero to move & jump to the enemy. (② in the image
    In the y-axis, it's combined by a move to the enemy and a move to jump.
    But I write

    Code (CSharp):
    1. transform.DOLocalMoveY(enemy.y, t0);
    2. transform.DOLocalMoveY(jump.y, t1);
    Only the last line works.

    How can I combine them together?
    aaa.png
     
    Last edited: Nov 20, 2020