Search Unity

DOTween (HOTween v2), a Unity tween engine

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

  1. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Uhm I tried to replicate the same process and everything's good here. I'm wondering, since your step-by-step process is missing it, did you run DOTween Setup from Tools > DOTween Utility Panel and you just forgot to mention it? Or you didn't run it? Because what you have in those folders is all DOTween's files prior to the setup (where all the "addon" files are imported or scrapped based on your Unity version).
     
  2. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    @Izitmee
    @Seith
    That is exactly the problem I as having except a few other reference errors, but same problem after importing from UAS.

    I did the same as @Seith and when I clicked on the DOTween setup tool I think it said that I needed to update, which then threw me off because I was indeed using the latest version.

    Could document this issue more later tonight California time.

    Thanks
     
  3. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    Just for the record, I didn't know about the DOTween "Setup" thingy. So @Izitmee helped me and once I ran that (after the steps described in my previous post) then everything updated as expected..
     
  4. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Issue solved (or at least understood) via Skype and private messaging. Thanks to you guys for letting me get to the root of the problem :) In @gegagome's case, issues arise because of two DOTween folders in the same project, and even deleting one of them doesn't let the setup happen correctly until your restart Unity. Will start placing the DOTween folder inside a Demigiant folder even on the website, so when downloading from the Asset Store it will simply be replaced. Otherwise, if you want to place DOTween in a custom folder just delete it prior to the Asset Store reimport (or simply continue to use and replace the one from the website :)).
     
  5. bngames

    bngames

    Joined:
    Jul 3, 2012
    Posts:
    67
    Hi

    RectTransform shortcuts (Unity UI 4.6)

    DOAnchorPos do not work when usingDG.Tweening;
     
  6. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    Not sure how you are trying to do the tween, but I have this:
    Code (CSharp):
    1. sceneButtons[i].buttonRect.DOAnchorPos(sceneButtons[i].exposedPosition, 0.25f, false)
    and it works great.
     
    Demigiant likes this.
  7. Little-Big-Monkey

    Little-Big-Monkey

    Joined:
    Mar 4, 2014
    Posts:
    40
    Hello Izitmee,

    Now that DoTween is on the Asset store, I can try it ^^
    So I'm testing a basic timer as explain on your website :
    Code (CSharp):
    1. DOTween.To(() => timer, x => timer = x, 5.0f, 5.0f);
    But I'm getting weird result...

    Please don't tell me you didn't set the easing to linear by default once again ...
     
  8. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,051
    There is one problem that may happen if you do this in the following order:

    1. Create a Unity empty project.
    2. Copy to this project some code using DOTween 4.6 UI extension methods. You will have compiling errors (it's reasonable since we don't have DOTween yet)
    3. Import DOTween from Asset Store.
    4. It will still having compiling errors and you can't open the DOTween window (where it checks for 4.6 and import additional dlls) because Unity can't compile DOTween because there are additional compiling errors which you can't fix without compiling DOTween.
    5. So you are in a dead end.

    The fix is that you can't have DOTween 4.6 UI extension methods code before importing DOTween (or import dlls manually that I think I read in a previous post).
     
  9. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    In my case, quitting and restarting Unity fixes the DOTween Panel window issue.
     
  10. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Agh! What happened to my mail notifications :O Sorry for being late to the answers guys, and thanks @gegagome for taking care of them :)

    @Little Big Monkey Yes I did :D The default ease is OutQuad, but you can change it to Linear very easily :)
    Code (csharp):
    1. DOTween.defaultEaseType = Ease.Linear;
    @N3uRo One of the advantages of having DOTween in a DLL is that the Utility Panel will work even if there are script errors. If the Tools menu doesn't appear though, which sometimes can happen when following your procedure, just close and reopen Unity as @gegagome said and it will be there.
     
  11. gregduret

    gregduret

    Joined:
    Oct 27, 2013
    Posts:
    1
    Hello tweenlovers, I'm trying to migrate from Hotween To DoTween which is great but I'm a little confused sometimes:

    1. With Hotween I'm tweening à Sequence's property : "position" wich is a Get, Set Property.
    What is the equivalent in Dotween's Sequence? ("Goto" return the position but may not be Set)

    2. I'm not used to lambda syntax... How can I Tween a simple variable of my class instead of writing DOTween.To(()=> myFloat, x=> myFloat = x, 52, 1);???

    Thanks a lot!
     
  12. Little-Big-Monkey

    Little-Big-Monkey

    Joined:
    Mar 4, 2014
    Posts:
    40
    It's against all logic ...
    And it's seam it's not even outQuad, but InOutQuad ...
     
    Trinary likes this.
  13. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
    Hi Izitmee

    Great tools ! Dotween is very good !

    I need a advise about pooling tweens.

    I have to instanciate 500 tween via ( rigidbody.DoRotate) which alloc on a frame 184kb. So my question : there is there a way to create mass tween for to avoid allocation ?
     
    Last edited: Jan 21, 2015
    Trinary likes this.
  14. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Humm.. I am wondering if there is way to do tween control using animation curve value...?

    so Instead of making it either linear (or have one of the ease funtion) I would like the value to be controlled by the animation curve..

    for example if I have animation curve that goes from 0-1 in x and 0-1 in y , the overall tween's out come must be say, multiplied by the curve value at the interpolated time line between 0-1 for the tween's time frame..

    Not sure if I explained this clearly, but any ideas?

    --- Edit ---

    Haha.. Just found about that in ease section of document. Excellent... I will try that out.
     
    Last edited: Jan 21, 2015
  15. oddgoo-io

    oddgoo-io

    Joined:
    Aug 22, 2014
    Posts:
    16
    Hello and thank you for such an awesome package!

    Quick question, do you have any tips or suggestion of having this work with Unity Cloud Build? The "setup" step configures things locally, so when it goes to the server the compilation process halts at "namespace DG not found". Perhaps there is a way to do the setup manually?

    Thank you!
     
    Trinary likes this.
  16. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    This is a completely irrelevant question, but is there a way to read a HorizontalLayoutGroup-driven RectTransform?

    I need to read RectTransform's (anchoredPositions (on a List)) that are inside a panel with a HorizontalLayoutGroup component.

    DOTween is able to tween these locked out (Some values driven by HorizontalLayoutGroup.) rectTransforms and I was wondering if you knew of a trick to read them.

    Thanks
     
  17. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    @gregduret Hello!

    1. You can get a Sequence's position using Elapsed(), but it's not a property you can tween. Mhmm didn't think you might want to tween a Sequence's position. Gonna add that.
    2. For properties that don't have shortcuts you have to use the generic way and thus lambdas. What you wrote though is correct, and if you get used to that you'll be happy, because lambdas are way way more efficient and performant than strings (plus strings are prone to generate errors, in case of mis-typing, that are caught at runtime).

    @Little Big Monkey Ohmygod why is there InOutQuad? :O Apologies for that, I'll change it to OutQuad in the next update (OutQuad makes sense because it's the default ease type for tween engines, since the good ol' Flash times).

    @lenneth78 Hello! You can create your tweens at startup and store them in a Tween array in a paused state. Then when you need them you can do a for loop and Play them.

    @castor76 Also, note that you can use an AnimationCurve as an ease :)

    @oddgoo.io I never used Unity Cloud Build, but in theory shouldn't you be able to upload your changes to the repo? Otherwise, you can manually move the DOTween folder (after the setup) to the cloud. What setup does is simply remove the "addon" extension to the valid DOTween dlls for your Unity version, and delete the ones not compatible.

    @gegagome I just tween regular properties. You can see what I do in the background here, but there's no trick :p
     
  18. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
    Ok but dotween don't pool tween ? I mean if at startup I instanciate 1000 tweens, there are in pooling right ?

    And also if I do what you say, I can modify the to and from without new allocation. For be sur :)
     
  19. Little-Big-Monkey

    Little-Big-Monkey

    Joined:
    Mar 4, 2014
    Posts:
    40
    @Izitmee Please change it to Linear, Flash is crap and dead ... It make more sense that by default there is no ease to a tween, like there is no delay by default ... If I want an ease, I just set it on the tween, like any other options ..

    One more thing : When you don't call Init() (which is not mandatory as said in your docs), we received a warning. In production we have to run with Error and Warning free..

    And an other question : Your pluggin is open sourced, so why don't you put the source code in the package instead of the dlls ? so you don't have to deal with multi dll version
     
  20. indie6

    indie6

    Joined:
    Dec 15, 2012
    Posts:
    101
    Is there any Visual editor of DOTween? Like the one you had for HOTween?
     
  21. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    @lenneth78 Tweens are pooled if you activate recycling (read more here, also about the ways you should pay attention when recycling). You can modify the start/end values after creating a tween like this, and there will be no allocations unless you're tweening an object that generates allocations itself :)

    @Little Big Monkey I apologize but I really can't change it to Linear by default: my heart will break :O Almost every animation system uses an OutSomething by default, because unless you're tweening numbers it's the most used ease for animations, Flash or not. And I made it so you can change the default easily yourself so there should be no problem if you prefer Linear.

    About warnings, that warning is necessary for users that don't realize DOTween.Init exists. But you can simply call DOTween.Init yourself and avoid it.

    About lose scripts, I actually wanted to do that when I started DOTween. Then after a while I realized it was just too bad and moved once again to assemblies. Thing is, to have a good API internal namespaces are absolutely necessary imho, otherwise users could access variables that are not meant to be accessed (but still need to be accessed by the rest of the library) and the API and usability would become terrible. Also, with assemblies I can eventually reorganize classes without worrying that old stuff will be left over by previous installations :)

    @indie6 I don't plan to do a Visual Editor for now (though there will be a path editor in the Pro version). But there were a couple users that seemed interested in doing one themselves and possibly share it.
     
  22. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    So when can we get our hands on this Pro-Version of yours?
     
  23. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    All done (at least the basic pro content like the path editor) and I was ready to release last week, but then I decided to make a modification, allowing editor paths to generate paths directly. This will make things much smoother at runtime, but I can't release now and add it later because it would break editor paths made in the old way. So I need to put up a little more work. I didn't do much last week and this one, with the Steam release, but I hope to do it within the next one for real :B
     
  24. Little-Big-Monkey

    Little-Big-Monkey

    Joined:
    Mar 4, 2014
    Posts:
    40
    Just to say, you can have internal namespace without the need of dlls. You can use Internal or friends keywords. But too much namespace is not that good. A single "Using Dotween" would be nice or none at all would be good too !
    And with open source we can change this linear ease or this LogWarning to standard Log ourself ...
    When installing à new version, we just delete the previous folder before importing the new package. I do this with NGUI for so long whitout any problem.

    Just my opinion ..
     
  25. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Sadly that's not the case. If you use lose scripts they're all considered as a single assembly and thus the internal keyword has no effect at all. Sure, you can nest stuff under "semi-hidden" namespaces to avoid people reaching them without additional imports, but if you need a public class like Tween to have internal-only accessors it can't be done without working on an external assembly :p

    Let me know why calling DOTween.Init and setting the defaultEaseType yourself is so much of a problem. I might add a configuration option that allows to manually set defaults via the utility panel.
     
  26. tjjoss

    tjjoss

    Joined:
    Apr 7, 2014
    Posts:
    4
    Sorry if this has been asked before (or if this is a dump question), but, is there a way to tween a value based on another value instead of based on time? To clarify a little, lets say I want to animate a box from 0,0,0 to 10,10,10, but instead of telling DOTween to do that in 3 seconds, could I specify a value (maybe between 0 and 1) to control the execution of the tween (and hence, the position of the box)? Like if I specify .5 then the box would be on 5,5,5.

    Thanks in advance and thank you for an awesome tool =)
     
    Last edited: Jan 23, 2015
    Trinary likes this.
  27. cmilr

    cmilr

    Joined:
    Dec 10, 2014
    Posts:
    31
    Thanks again for this great plugin.

    I'm wondering if there's a way to tell DoMoveX/DoMoveY/DoMoveZ not to slow down as they approach their target destination?

    Thanks!
     
  28. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    You need to change the ease type. Use SetEase on the Tweener to make it Linear. DOTween something other than Linear as its default.
     
    Demigiant likes this.
  29. Little-Big-Monkey

    Little-Big-Monkey

    Joined:
    Mar 4, 2014
    Posts:
    40
    In fact it's due to the number of scene in the project.
    Let say you have 50 scenes in your project. You can initilize the value in the first one and go throw scenes linearly and it's working well. But if you go throw scenes randomly, you don't have a first or last scene, you will have to initialize the value in each scene.

    But a config file or panel would be a good solution, great idea !
     
  30. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    @tjjoss You are the second person asking for a tweenable "position" property on tweens, so I definitely have to implement it. In the meantime you can use a custom variable and the Goto(position in time) - but note that a half time position will result in a half value only if you set the ease to Linear.

    @jguarShark Exactly what @mimminito said. Also, you can change the default ease type for all newly created tweens with DOTween.defaultEaseType.
     
  31. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    @Little Big Monkey Will do that then!
    On a secondary note, I would suggest planning your projects so that you have a custom initializer class/MonoBehaviour being called or present in all your scenes, so you can use it to initialize stuff at startup (not only DOTween, but also audio systems etc), independently of the scene you start from. It's very useful :)
     
    CanisLupus likes this.
  32. cmilr

    cmilr

    Joined:
    Dec 10, 2014
    Posts:
    31
    @jguarShark Exactly what @mimminito said. Also, you can change the default ease type for all newly created tweens with DOTween.defaultEaseType.[/QUOTE]

    Thanks so much. Can you tell me what the default ease is set to? I don't see it listed in the documentation.
     
  33. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    UPDATE 0.1.050
    • CHANGE: Changed DOTween.defaultEaseType to Ease.OutQuad (was erroneously set to Ease.InOutQuad
    • BUGFIX: Fixed safe mode not working in some cases when target was destroyed before a tween started

    @jguarShark Default should've always been OutQuad, but was erreneously set to InOutQuad. Please get this latest version that fixes it.
     
  34. tjjoss

    tjjoss

    Joined:
    Apr 7, 2014
    Posts:
    4
    @Izitmee It would be very nice if you could implement it, thanks! In the meantime I'm going to use the Goto function to see if it solves the immediate problem.
     
  35. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    I implemented it this afternoon then scrapped it and will ponder more about it. It's easy to add, but since it's a new variable it adds weight (even if super minimal) to tween instances, and I want to see if I can come out with a different solution. And by the way, Goto will surely work in the meantime, because I actually implemented it as a property that calls Goto in the background.
     
  36. CanisLupus

    CanisLupus

    Joined:
    Jul 29, 2013
    Posts:
    427
    First, a question: Is there any particular reason why Rotate/LocalRotate doesn't have single-axis versions (x, y, z), especially since it takes a Vector3 and not a Quaternion? :) Have I missed something obvious, perhaps?


    After using DOTween and the documentation for a while, here are a few things (in order from most to least important) that I think would benefit the user:


    1. The descriptions of the "From" method in the documentation should probably explain a little better what it means to act *immediately*. As it stands, it may seem that, when From() is called, it will act on the first animation frame and not on the exact line of code where it's called. Hence, the user might think that he/she can create a tween with a From and pause it for later use, only to discover that the From is affecting the object immediately, even though the tween never played. It's really just a matter of better describing From. Its behavior is good as it is, I think, but I only know it acts when the method is called because you told me some time ago. :p


    2. I believe there are some parameters that could use a better description. For example, I have a hard time finding out what these do or in what amount they do it, in their respective contexts:

    (Punch, shake...)
    vibrato
    randomness

    (Ease stuff)
    overshoot
    amplitude
    period

    There might be others I don't recall. I realize some of them might be hard to explain objectively, and others are probably part of formulas, but maybe even showing the formulas where they are used could be useful to the reader.


    3. The example for InsertCallback uses "AppendCallback" by mistake, even though it has the right parameters.


    4. Useless-spelling-corrections-that-mostly-only-people-like-me-will-notice, in case you have nothing better to fix or work on:

    - In "Vector3 instead than a float" I think you mean "instead of", if my english is correct. (Please don't kill me. XD)

    - Search for "enhhanced" and remove the extra "h". :p

    - In the "shorcut-enhanced object" link, "shortcut" is missing a "t".

    - In "Each of them have an optional parameter", shouldn't it be "has"?

    - Maybe more important than the previous ones: the Support section of the website still says that "DOTween is currently in alpha".


    5. The really useless. (Ignore for your own sanity, *unless* you haven't noticed and really want to fix it):

    - You have some method/parameter descriptions ending in ".", others in ".." ("Moves the target's position to the given value.."), others with no punctuation, and even a few ending in a comma (ex.: "Indicates how much will the punch vibrate,").

    - Some descriptions have the tweened variable in bold (ex: "Changes the layoutElement's preferredWidth/Height to the given one") while others don't (ex: "Tweens the target's anchoredPosition to the given value.", or "anchoredPosition3D" or "sizeDelta").

    It's useless to fix these, but as I was writing I though "what the hell, let me say this too and look like an idiot in public". I swear I'll not bring these up again. Ever. ;)


    I'm only going through the trouble because I really like DOTween and the surprising ease of use of the documentation for such a versatile library, so a few suggestions are applicable. ;) Keep up the good work!
     
    Trinary and gjf like this.
  37. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Hi @CanisLupus, oh you perfectionist master (and I say this with great respect)! First of all let me say thank you, and that I truly appreciate everything you wrote. I mean, except for point 5. Because now that I know point 5, I totally want those things to be fixed, but that will be hell so I'll postpone it even if I know they will haunt me :D

    About the missing DORotateX, that's to avoid confusion. While DOMoveX actually "touches" only the X of a transform's position, which means you can have a DOMoveY play at the same time without problems, a DORotateX wouldn't be able to touch only the X and have a DORotateY play simultaneously and independently (because quaternions are much more evil than vectors).

    About the rest:
    1. Added a maybe inelegant but functional (I hope) line to the FROM description: (immediately as in "the moment you write that line of code", not "the moment the tween starts".
    2. Noted that. Will try to write a better description (not doing it immediately because I have to do that both in the code and in the online docs)
    3. Fixed
    4. Fixed
    5. AAAAAAAARRRRGHHHHHHHHH!!! I fixed the ".." because those were easy, but for the rest I'll wait :D
    Thank you once again :)
     
    gjf likes this.
  38. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    P.S. @CanisLupus also, thanks for the English corrections. I had no idea that you couldn't use "instead than" (in Italian we can use the equivalent of both "instead of" and "instead than"), but now I will remember that :)
     
  39. CanisLupus

    CanisLupus

    Joined:
    Jul 29, 2013
    Posts:
    427
    Hi, @Izitmee. You're quite welcome. Thanks for fixing those!

    OK, the confusion that a DORotateX/Y/Z could create makes sense and I hadn't thought of it that way.

    The line you added to From seems perfect to me, as long as you close the parenthesis at some point. ;) (muahahahaha)

    By the way, in my previous post I wrote "though" instead of "thought", so I guess I don't qualify for Perfectionist Master™ just yet. :p I'm not a native English speaker (I'm from Portugal) and I bet that I use expressions which have much better ways of being written or are just plainly wrong, and some words that have much better substitutes, so please always double-check my "fixes" when in doubt. It's the curse of reading a lot from the Internet. Everyone makes mistakes, and after a while we start encountering the most common errors so many times that we doubt how it's really written or even use the wrong version from the start.

    As for "instead than", you can use both "instead of" and "rather than", so maybe that creates some confusion. :)

    Regarding point 5...... it's better to just leave it alone........for now...... :p
     
  40. MinhDao

    MinhDao

    Joined:
    Oct 28, 2013
    Posts:
    155
    Hi @Izitmee,

    Thanks for great asset!
    I have one question about tween control method. I created one tween then playBackwards. But DOPlayBackwards() seem doesn't work. Object not play tween backwards
    Code (CSharp):
    1. obj.transform.DOMove(new Vector3(0, 5, 32), 0.5f).SetEase(Ease.OutBack).OnComplete(TweenCompleted);
    2.  
    3. public void TweenCompleted() {
    4.   obj.transform.DOPlayBackwards();
    5. }
    So, how can i use control method like playBackwards?

    Thank you!
     
  41. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    @CanisLupus Nooooooo how could I forget that parenthesis after all we said!!! :O Fixed now :D

    I actually did double-check "instead of/than" after you questioned it (because it was one of those "woah but I was sure it was right I used it all my life"), and I'm very glad I know better now. Also, "rather than" is duly notes now, and I even used it today on a conversation, wohooo :)

    @MinhDao Hi! By default, as soon as a tween is completed it is killed to free up memory, and thus nothing will work on it after that. Add SetAutoKill(false) after your SetEase to prevent the tween being killed, and you'll see that everything will work :) Also, a note. It seems to me that you just want to play your tween twice, once forward and a second time backwards. Instead than using OnComplete to play it backwards, you can simply use a Yoyo loop like this (no setting autokill to false required in this case):
    Code (csharp):
    1. obj.transform.DOMove(newVector3(0, 5, 32), 0.5f).SetEase(Ease.OutBack).SetLoops(2, LoopType.Yoyo);
     
    MinhDao and CanisLupus like this.
  42. Sam-K

    Sam-K

    Joined:
    Mar 23, 2013
    Posts:
    27
    How can i stop animaion/tweens on a spefic gameObject ?
    is there anyway ?

    like gameobject.DoStop or DOTweenStop(gameobject) etc
     
  43. gjf

    gjf

    Joined:
    Feb 8, 2012
    Posts:
    53
    Code (CSharp):
    1. .DOKill();
     
  44. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Or if you just want to pause it so you can resume it later, you can use Pause (or DOPause if used as a shortcut).
     
  45. Little-Big-Monkey

    Little-Big-Monkey

    Joined:
    Mar 4, 2014
    Posts:
    40
    Thanks ! And thank you for the tip, I'll think about it ;-)
     
  46. waspswarm

    waspswarm

    Joined:
    Oct 2, 2013
    Posts:
    7
    We upgraded from HOTween to DOTween (0.9.310) back in November. The other day we decided to get a more recent version of DOTween. However, after completely removing our previous version and installing the latest (1.0.50) we noticed nothing was tweening anymore. I systematically went through and the subsequent build to our starting point (0.9.380) still worked but was broken as of 0.9.430.

    There doesn't seem to be an obvious new feature or obvious change between 0.9.380 and 0.9.430 (based on the info here http://dotween.demigiant.com/download.php).

    I have also tried changing our DOTween.Init() call to raise the log verbosity to LogBehaviour.Verbose from LogBehavior.ErrorsOnly but this doesn't appear to output any additional messaging to the Editor console other than the following:

    DOTWEEN :: DOTween initialization (useSafeMode: True, logBehaviour: Verbose)
    UnityEngine.Debug:Log(Object)
    DG.Tweening.Core.Debugger:Log(Object) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Core/Debugger.cs:18)
    DG.Tweening.DOTween:Init(Boolean, Boolean, LogBehaviour) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/DOTween.cs:134)
    GameConfig:Initialize() (at Assets/Scripts/Logic/GameConfig.cs:16)
    LevelNode:RefreshAll() (at Assets/Scripts/UI/LevelNode.cs:153)
    LevelNode:OnEnable() (at Assets/Scripts/UI/LevelNode.cs:102)


    If I change recycleTweens from true to false I see a number of NullReferenceException (for every DOTween.Kill(this) that we have been using):

    NullReferenceException: Object reference not set to an instance of an object
    DG.Tweening.Plugins.PathPlugin.Reset (DG.Tweening.Core.TweenerCore`3 t) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Plugins/PathPlugin.cs:26)
    DG.Tweening.Core.TweenerCore`3[UnityEngine.Vector3,DG.Tweening.Plugins.Core.PathCore.Path,DG.Tweening.Plugins.Options.PathOptions].Reset () (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Core/TweenerCore.cs:119)
    DG.Tweening.Core.TweenManager.Despawn (DG.Tweening.Tween t, Boolean modifyActiveLists) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Core/TweenManager.cs:233)
    DG.Tweening.Core.TweenManager.Complete (DG.Tweening.Tween t, Boolean modifyActiveLists) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Core/TweenManager.cs:483)
    DG.Tweening.Core.TweenManager.FilteredOperation (OperationType operationType, FilterType filterType, System.Object id, Boolean optionalBool, Single optionalFloat) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Core/TweenManager.cs:414)
    DG.Tweening.DOTween.CompleteAndReturnKilledTot () (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/DOTween.cs:565)
    DG.Tweening.DOTween.Kill (Boolean complete) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/DOTween.cs:604)
    JumpTarget.OnDestroy () (at Assets/Scripts/Logic/JumpTarget.cs:736)

    If I change useSafeTweening from true to false it doesn't appear to make any difference.

    As an experiment I created an entirely new empty scene and added a single game object. I added a sprite and a script component to this game object and was able to get a transform.DOMoveX to move the sprite.

    I also tried deleting my Library folder just in case something was getting cached. This made no difference.

    Any ideas on the best way to troubleshoot why our other tweens stopped working?

    We are using Unity 4.6.1p1 on Mac OSX and Windows 8.1.

    Thanks in advance!
     
    Last edited: Jan 27, 2015
  47. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    @waspswarm That is very very weird. First thing that can help you, add an OnKill callback to one of the tweens that should play but are not. That way you can see if something is killing it and trace back to the culprit.
    Code (csharp):
    1. myTween.OnKill(()=>Debug.Log("Killed"));
    Other than that, if your project is not too big and you're willing, you can send it to me via PM so I can investigate better, since I'm very eager to understand what's wrong.
     
  48. waspswarm

    waspswarm

    Joined:
    Oct 2, 2013
    Posts:
    7
    Thanks for the quick reply. I did as you requested and noticed that a Camera.main.gameObject.transform.KillTweens() in a function we have to Pan the camera is calling that OnKill you suggested I add to a totally different tween.

    KillTweens() is an extension method:
    public static void KillTweens(this Component component)
    {
    DOTween.Kill(component);
    }

    I will check with my boss about sending you the project.
     
    Last edited: Jan 27, 2015
  49. fermmmm

    fermmmm

    Joined:
    Oct 18, 2013
    Posts:
    129
  50. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    @waspswarm DOTween.Kill(component) will kill all tweens which have that component as a target (target means the tween was created with a myComponent.DOMove/Rotate/Etc). I'm also thinking that maybe I might've introduced a bug which, in case the component parameter is NULL, kills all tweens. I'll check that out tomorrow morning (superlate here now).

    @fermmmm DOTween uses regular eases, so you can see them here. Other than that, I actually did make an ease previewer which I use internally to test ease types (and to eventually create new ones in the future). Will add the visualizer to the next update.
     
    gjf likes this.