Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

DOTween (HOTween v2), a Unity tween engine

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

  1. cesarpo

    cesarpo

    Joined:
    Jun 8, 2013
    Posts:
    98
    Hi, I'm trying to update the end value of a tween using the OnUpdate handler with the following code:

    Code (CSharp):
    1.         Tweener tween = sprite.transform.DOMove(GameManager.Instance.Camera.ScreenToWorldPoint(target.position), .5f)
    2.             .SetEase(Ease.OutExpo)
    3.             .OnComplete(() => { Kill(); });
    4.        
    5.         tween.OnUpdate(() =>
    6.         {
    7.             tween.ChangeEndValue(GameManager.Instance.Camera.ScreenToWorldPoint(target.position));
    8.         });
    But I get the following error:

    Code (CSharp):
    1. DOTWEEN :: ChangeEndValue: incorrect newEndValue type (is UnityEngine.Vector3, should be DG.Tweening.Core.Surrogates.Vector3Wrapper)
    2. UnityEngine.Debug:LogWarning(Object)
    3. DG.Tweening.Core.Debugger:LogWarning(Object) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/Debugger.cs:26)
    4. DG.Tweening.Core.TweenerCore`3:ChangeEndValue(Object, Single, Boolean) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenerCore.cs:74)
    5. <enterCollected>c__AnonStorey10:<>m__3A() (at Assets/game/scripts/behaviours/Coin.cs:84)
    6. DG.Tweening.Tween:OnTweenCallback(TweenCallback) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Tween.cs:263)
    7. DG.Tweening.Tween:DoGoto(Tween, Single, Int32, UpdateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Tween.cs:238)
    8. DG.Tweening.Core.TweenManager:Update(UpdateType, Single, Single) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:390)
    9. DG.Tweening.Core.DOTweenComponent:Update() (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/DOTweenComponent.cs:50)
    Any ideas?
     
  2. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    AN IMPORTANT NOTE
    I apologize for being late to support since Sunday, and I will probably continue like that until the end of the week
    . I got a death in the family and it's being a pretty heavy week. Will come back to normal superquick support next week. Whew.

    @zombiegorilla Heya! Right now I don't remember. I'm gonna check it immediately and get back to you. And if it's not public for a reason I'll try to make it publicly work.

    @ortin You definitely have a point. Will ponder about that.

    @SidarVasco I apologize, I probably got the wrong translation there. With "loop cycle" I mean a single loop. Meaning that, if I have a tween with SetLoop(3), there are 3 loop cycles.

    @cesarpo ChangeEndValue doesn't work inside OnUpdate. I thought no one would ever want to do what you're doing, but since I'm wrong I'm gonna fix that.
     
  3. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    New DOTween update v1.0.665
    • NEW: Added tween.PathGetPoint method
    • NEW: Added DOTween.TweensById and DOTween.TweensByTarget optional parameter which allows to return only playing tweens with the given filter
    • NEW: Added Tween.IsInitialized() method
    • NEW: Added RectTransform.DOShakeAnchorPos shortcut
    • Better description of what happened after calling Setup from DOTween Utility Panel
    • Added check to prevent already sequenced tweens to be added to other Sequences
    • BUGFIX: Fixed ChangeEndValue throwing errors when called inside an OnUpdate callback
    • BUGFIX: Fixed SetDelay not working correctly with named parameters
    • BUGFIX: Fixed OrientToPath not working correctly in case of local paths

    P.S. @zombiegorilla and @cesarpo: Voilà :)
     
  4. Alec-Slayden

    Alec-Slayden

    Joined:
    Dec 16, 2008
    Posts:
    94
    Hi,
    This may be a silly question but I didn't see it explicitly stated in the docs or available through my skimming and searching:

    Am I responsible for setting callbacks null on tweeners getting recycled, or does that happen when they're killed? I don't want to clutter up scripts with cleanup code if it's automated, but I don't want to risk dangling delegates either.

    Thanks!
     
  5. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    @Alec Slayden Hi,

    When a tween is killed (both with recycling on and with recycling off) it's completely cleaned, events included.

    Cheers!
     
  6. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    7,889
    Unbelievable. Not only a kick ass product, but amazing support! Thank you very much. There aren't enough positive words to describe you and DOTween.

    Thanks!
    ZG
     
    Izitmee likes this.
  7. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
  8. ortin

    ortin

    Joined:
    Jan 13, 2013
    Posts:
    221
    Ok, forget what I said before :) It was just a specific case argumentation.
    A Complete(bool activateCallbacks) overload is totally fine with me.
     
  9. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    @ortin Aha too late! I didn't tackle it today because I was working on some Pro stuff, but tomorrow or the day after I'll see if I can do it the way you wanted it. And if not, I'll take advantage of you cutting me some slack :)
     
    meapps likes this.
  10. cesarpo

    cesarpo

    Joined:
    Jun 8, 2013
    Posts:
    98
    I'm still getting the same error, using the hyper compatible version. The Dotween Utilty Panel says v1.0.665.

    Code (CSharp):
    1. DOTWEEN :: ChangeEndValue: incorrect newEndValue type (is UnityEngine.Vector3, should be DG.Tweening.Core.Surrogates.Vector3Wrapper)
    2. UnityEngine.Debug:LogWarning(Object)
    3. DG.Tweening.Core.Debugger:LogWarning(Object) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/Debugger.cs:26)
    4. DG.Tweening.Core.TweenerCore`3:ChangeEndValue(Object, Single, Boolean) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenerCore.cs:74)
    5. <enterCollected>c__AnonStorey12:<>m__3C() (at Assets/game/scripts/behaviours/Coin.cs:77)
    6. DG.Tweening.Tween:OnTweenCallback(TweenCallback) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Tween.cs:263)
    7. DG.Tweening.Tween:DoGoto(Tween, Single, Int32, UpdateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Tween.cs:238)
    8. DG.Tweening.Core.TweenManager:Update(UpdateType, Single, Single) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:390)
    9. DG.Tweening.Core.DOTweenComponent:Update() (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/DOTweenComponent.cs:50)
    Sorry to hear about the loss.
     
  11. Dragonic8926

    Dragonic8926

    Joined:
    Mar 10, 2014
    Posts:
    27
    Is it possible to tween the Tiling and Offset properties for a material ?
    Because it seems that Material.DOVector(Vector4 to, string property, float duration) works only for colors' properties !
     
  12. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    185
    What does DOTween do? Is there a main function most people use DOTween for? Is DOTween like Playmaker, Behavior Designer, Icode, etc but with different interface? Can someone explain the difference? I have never used any of this tween stuff.
     
  13. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,073
    Hey there.

    Don't know if this is a bug or not:

    I have a simple Sprite. This one has two DOTween Animation Components attached. Both are "Fade"-Animations.
    The first is a TO-Animation (fading to 0), the second is a FROM-Animation (Fading to 1).

    The first one is set to AutoPlay. The second on is called by ID in an other script when a certain bool is set to true. Furthermore the second Tween-Animation has an OnComplete-Callback.

    Now when I hit "PLAY" the first Tween, which is set to Autplay and should Fade the Sprite to 0, does not play. The Alpha-Value is set immediately to 0. If I remove the second Tween-Animation it works properly.

    Where did I F*** up? :D
     
  14. Alec-Slayden

    Alec-Slayden

    Joined:
    Dec 16, 2008
    Posts:
    94
    @giraffe1
    Have you ever had to write a coroutine or a section in Update to change a value over time for something? Like interpolating a position with a value changing from 0 to 1, or fading out a canvas, or changing scale, etc through script?

    DOTween, like many tween engines, largely eradicates the need to write those methods and coroutines, by having pre-built utility methods that do that for you, plus a lot more. It'll automate moving a vector to another vector, or even fade out the canvas group for you directly, you can have things happen every frame it updates or once it completes. Imagine all the various things you'd need to write interpolation coroutines for. At their most basic level, tween engines are plugins that do all those things for you so you only need to write one or two lines of code. At a higher level, they provide powerful options with callbacks and tweening of things that would be weird, difficult, or time consuming to write yourself.
     
  15. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,182
    I noticed when using the Path Visual Editor in DoTween Pro, if you only have one waypoint the tween does not play. I know it makes sense to assume nobody would use one waypoint on a path, but it'd be nice if the path still played with just one waypoint for specific cases.

    [EDIT]
    Feature requests:
    1) Could you add an OnUpdate to the DoTweenPath script?
    2) Also, add the option to remove x,y, or a z rotation on orientation for LookAt on DoTweenPath script.
     
    Last edited: May 8, 2015
  16. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    @cesarpo Thanks. And ouch, that is another issue, related to the hyper-compatible version. Find the fix attached.

    @Dragonic8926 You can do that using the generic way, but if you give me a couple hours I'm gonna add shortcuts for that.

    @Alec Slayden thanks for the very correct answer to @giraffe1. Also, in case you want to read more, I wrote a blog about it a few weeks ago: "What is a tween engine?"

    @BTStone Heya! Everything works correctly here. Are you sure you're not seeing Unity Editor's startup hiccup, where the first seconds of time-based-everything (not only tweens) happen almost immediately when pressing Play (because Unity takes a while to jump start correctly while in the editor)?

    @Ben BearFish Duly noted!
     

    Attached Files:

  17. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    @Dragonic8926 Grab this new version. It adds Material.DOTiling and Material.DOOffset shortcuts :)
     

    Attached Files:

  18. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,073
  19. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    185
    thanks to Alec Slayden and Izitmee for answering my question. I will check out your blog explanation as well.
     
  20. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    @BTStone ouch sorry, I'm a little distracted this week :B Can you send me a repro then? Because I tested it here and everything works correctly.

    @Ben BearFish And here it is, paths now work even with a single waypoint, and I added the OnUpdate callback. Lock rotation yet to come.
     
    Ben-BearFish likes this.
  21. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,073
    Ieh. Don't know how to really repro this one. Mhm. Let me do some test, I'll get back to you on this one.
     
  22. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,073
    I can sent you the scene if you want, but basically this is it:
    Setup.png

    An empty scene with only the cam and a rectangle-black-sprite. Two DOTween-Animations attached, one is set to Autoplay, the other isn't. When run, Alpha-Value is immediately set to 0. When I remove the second DOTwee-Animation (which is also a Fade Animation, set to FROM) it fades out smoothly.

    Another thing is: when the second Animation-Component is attached, it doesn't even matter if the first one has a Delay. It also doesn't matter if the second has a Delay. Alpha is immediately set to 0.

    And I'm using the latest DOTweenPro Version btw. :)
     
  23. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    @BTStone Oh I see now. I thought the FROM was set to 1. Like this instead, that's the thing that will send your target to 0 immediately. FROM, both in DOTweenAnimations and in the regular DOTween, immediately sends a target to its FROM value, in your case 0. If you just want to fade back in the sprite, why not use only the first DOTweenAnimation, without AutoKill, and then call:
    Code (csharp):
    1. myDOTweenAnimation.DOPlayBackwards();
    when you want to fade in again?
     
  24. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,182
     
    Izitmee likes this.
  25. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    8,282
    I'm trying to add DOTween to a project. I just downloaded the latest version, dragged into my project hierarchy, and in an attempt to follow the instructions, I've looked everywhere for this mythical "Tools" menu so I can use the "Setup DOTween" command.

    I don't have a Tools menu!

    I vaguely recall seeing this the first time I tried to use DOTween too, but that was (IIRC) because I had some compile error in one of my scripts. I've verified that I don't have any compiler errors now. Yet, no Tools menu. Visual proof:


    Probably related: if I attempt to use CanvasGroup.DOFade in my code anyway, I get this error:

    Code (csharp):
    1. Assets/Scripts/ActionSystem/AchievementDisplay.cs(35,31): error CS1928: Type `UnityEngine.CanvasGroup' does not contain a member `DOFade' and the best extension method overload `DG.Tweening.ShortcutExtensions.DOFade(this UnityEngine.Material, float, float)' has some invalid arguments
    I do have "using DG.Tweening;" at the top of the script, and that doesn't generate any error, suggesting that the compiler at least knows about it... but other than that, I'm having no joy. Any ideas what I'm doing wrong?
     
  26. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,182
    @Izitmee , I thought of one other feature for your visual editor that I think would make your tween library even more amazing then it already is. I mentioned it on your official forums, but thought I'd mention it here too. The ability to tween camera properties with the DoTween visual editor would make DoTween the defacto camera path or cutscene tool.
     
  27. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    @JoeStrout Sometimes Unity doesn't update menus immediately. Just click on any Unity menu, and then the Tools one will magically appear :) After the setup, CanvasGroup shortcuts will become active and working.

    @Ben BearFish Totally added that to my todo list :) Might even be able to do that tomorrow.
     
  28. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    387
    @Izitmee

    I am using 1.0.610 and I just ran the profiler and saw the attached warning.

    Is this anything to worry about?

    cheers

    Nalin Screen Shot 2015-05-08 at 19.40.04.png
     
  29. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    8,282
    I've clicked, I've invoked, I've quit and restarted Unity... still no Tools menu. :(

    Is there any other way to summon the setup window?
     
  30. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    @JoeStrout That is very weird, the menu is one of those things that should just be there, without any chance for bugs. Could you try again with this version of DOTween I'm attaching? Completely delete the existing DOTween folder then replace it. If this doesn't work, there are two things that come to my mind:
    1. can you make a search to be sure you don't have more than one DOTween folder in your project? That would drive Unity crazy, even if it should throw out errors, not hide the Tools menu.
    2. what other external assets are you using? Just TextMesh Pro and Vectrosity? It shouldn't be possible, but maybe one of them is removing the Tools menu somehow?
    @puzzlekings That is Unity warning you that, if you move an object that has a collider but not a rigidBody, it will be a semi-expensive operation because of how Unity physics' engine works. It's not a nono, just something to consider: if you don't need a collider on that object, remove it.
     

    Attached Files:

  31. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    8,282
  32. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,073
    Ah I see. Well then I'll do it the way you suggested :)
    But why does it fade immediately to 0 If it's not set to Autoplay?
     
  33. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    @JoeStrout Glad we solved it (love the avatar btw)!

    @BTStone FROM sends its target to the FROM value immediately, independently of when it will be actually played. That was debated a lot with HOTween, where initially the targets would go to the FROM point only when the tween actually started playing. After various talks with various users, I came to the realization that it is much more useful to do the contrary, which is what DOTween does :) Also, with DOTween's architecture it is necessary to allow Sequences to know where the target will be when appending a new tween.
     
    BTStone likes this.
  34. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,073
    Alright. Well, now that I know this, it's easy to solve that one. Thanks Daniele! :)
     
  35. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    DOTWEEN PRO UPDATE v0.9.255

    New features:

    • DOTweenAnimation > Greatly optimized startup at runtime
    • DOTweenAnimation > Inspector usability optimizations
    • DOTweenAnimation > Now using RectTransform's anchorPosition even with Shake/Punch tweens
    • DOTweenAnimation > While playing inside the Editor, you can now enter "Edit Mode", modify the animation, and restart it, to test various settings
    • DOTweenPath > Paths now work even if they have a single waypoint
    • DOTweenEditors > Added OnUpdate callback
    • DOTweenPath > Added "Copy waypoints to clipboard" button inside Waypoints toolbar
    Bugfixes:
    • Fixed DOTween Utility Panel not working on Windows if the project is inside a Documents folder that starts with a "#"
    IMPORTANT
    This new version greatly optimizes DOTweenAnimations startup, but requires all animations to be reassigned. It's very simple, don't panic. Just select each gameObject that has a DOTweenAnimation attached (one by one, not all together): that is enough to update it automatically.
    In case you should forget, a warning will appear while playing, telling you exactly what to do and which gameObject to select.


    @Ben BearFish After doing the DOTweenAnimation optimizations I wanted to tackle camera tweens, but I realized you can already tween the camera: move, rotate, shake and punch it. What else would you like to see for it?
     
  36. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    387
  37. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    Oops, fixed! Thanks :)
     
  38. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,182
    I was thinking field of view, aspect ratio, background color, depth, near plane, far plane, orthographic size, and the camera's rect. Pretty much access to every useful member of the camera class. I feel with all those freely available to access with the visual editor, it'd be much easier to make a camera/cutscene setup.
     
  39. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,182
    @Izitmee I also was wondering if I could perhaps ask you what would be the best way to go about solving a problem I had that I was trying to solve with DoTween.

    I need to do a flythrough with my camera of a building on a path through waypoints. At each waypoint I need to have the camera rotated at a specific angle and field of view. I also need the camera to pass through the waypoints without pausing/stopping.

    Currently, to have control over the tweening of the rotation of the camera in-between waypoints, I setup the code so I start a tween to move the camera to the next waypoint and tween the rotation and field of view of the camera at the same time until I reach the next waypoint. When the tween is OnComplete I create another tween that does the same thing to the next waypoint until there are no more waypoints. By doing it this way in code I have control over the duration of how long in-between waypoints and other stuff between waypoints. So far it all works, the only issue I noticed is that there is a noticeable pause between waypoints and movement cannot be smoothly curved between waypoints like when I use your built-in path editor.

    Thus, I was wondering how you would approach this problem with your DoTween? Also, if what I described didn't quite make sense, I can make a video.

    Basically, I'm trying to do your DoTween Path, but with more control between waypoints rather than over the entire path only.
     
  40. cesarpo

    cesarpo

    Joined:
    Jun 8, 2013
    Posts:
    98
    Hi, I can't get 685 to work. it shows a "Behavior is missing" warning in the Unity console when calling:
    Code (CSharp):
    1.         DOTween.Init(false, true, LogBehaviour.Verbose);
    2.  
    665 works, except I'm back to the error where I can't change the end value.

    By the way, changing the end value is the best option I have for tweening an object towards other that may move a little?
     
  41. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    @cesarpo Now that is very weird. I just tested it out and it works here. What Behaviour is missing? Can you post me the whole log, and a screenshot of the object with the missing behaviour?
    About your question, yes, changing the endValue is the best way (but remember to set the last parameter to TRUE, so that the start position will be reassigned correctly)

    @Ben BearFish Added those other camera feature to my todo list. Will do that asap.

    About the different speed between waypoints, I would actually recommend another approach. Grab the tween created by DOTweenPath (with myDOTweenPath.GetTween()), then add an OnWaypointChange callback to it. When the waypoint changes, you can simply change the tween's timeScale to reflect your desired speed. That would also be much more efficient/performant than having different paths for each waypoint. Also, if you want you can also tween the timeScale, so that the speed will change smoothly.
     
  42. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    @Ben BearFish As a starter, I just added all the camera shortcuts you were asking for to the basic DOTween version (not yet released). Though I didn't add "depth", since I find it useless to tween. Are you sure you need that too?
     
  43. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,182
    Yeah, depth isn't needed. I was just listing every camera property I could think of. Also, thanks for the advice on the waypoints.
     
  44. meapps

    meapps

    Joined:
    May 21, 2013
    Posts:
    167
    @Izitmee Great update. Could you add to the Tween Path that it picks random Waypoints?
     
  45. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    @meapps That sounds like a weird feature. You mean scrambling the existing waypoints when it starts? Or generate random waypoints?
     
  46. meapps

    meapps

    Joined:
    May 21, 2013
    Posts:
    167
    Yes like scrambling or shuffling the waypoints on the start. I know it sounds weird but it works great for my FIREBALL in one of games like random spawning and moving.

    I think it would make sense for different behaviors like enemys or scouting etc.
     
  47. Dragonic8926

    Dragonic8926

    Joined:
    Mar 10, 2014
    Posts:
    27
    Thank you ! That will help me because I didn't find how to do that with the generic way ^^' !
     
    Last edited: May 11, 2015
  48. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,073
    Hey Daniele,

    when importing the latest version I get a bunch of errors:

     
  49. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,228
    @meapps Understood. Will do (after I add the new Camera options to DOTweenAnimation)!

    @Dragonic8926 Just to explain how the generic way works, here's how you would've done them with that :)
    Code (csharp):
    1. // Texture Tiling
    2. DOTween.To(() => target.mainTextureScale, x => target.mainTextureScale = x, endValue, duration);
    3. // Texture Offset
    4. DOTween.To(() => target.mainTextureOffset, x => target.mainTextureOffset = x, endValue, duration);
    @BTStone Coming to twitter to investigate this quickly!
     
    Dragonic8926 likes this.
  50. meapps

    meapps

    Joined:
    May 21, 2013
    Posts:
    167