Search Unity

LeanTween - A tweening engine that is up to 5x faster than competing engines!

Discussion in 'Assets and Asset Store' started by dentedpixel, Dec 3, 2012.

  1. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    Of course:

    Code (CSharp):
    1. LeanTween.value( gameObject, v => {returnedValue = v;}, startValue, endValue, time ).setEase(LeanTweenType.easeOutQuad);
     
    rakkarage and dentedpixel like this.
  2. Essential

    Essential

    Joined:
    Sep 8, 2011
    Posts:
    265
    Thanks for the reply. That seems a bit more complicated to me though. :confused:

    What does this part mean?
    Code (csharp):
    1. v =>{returnedValue = v;}
     
  3. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    That's a lambda expression. It looks weird, but it's actually simpler than the alternative: you could just put your own method in there if you wanted, but the code I pasted only uses one line, which is nice. For example, this does exactly the same thing:

    Code (CSharp):
    1. float myLocalFloat;
    2.  
    3. void MyCalledMethod() {
    4.     LeanTween.value( gameObject, SetFloat, startValue, endValue, time ).setEase(LeanTweenType.easeOutQuad);
    5. }
    6.  
    7. public void SetFloat( float setValue ) {
    8.     myLocalFloat = setValue;
    9. }
    10.  
    11.  
     
  4. Essential

    Essential

    Joined:
    Sep 8, 2011
    Posts:
    265
    Ah, I think I understand what you're doing now Marble, but it's not what I needed in my original question.

    I don't want to begin an animation from startValue to endValue and get returned every single value, I just want to get an arbitrary point in that easing function. E.g.:
    Code (csharp):
    1. float arbitraryPoint = 0.6f;
    2. float convertedToEaseOutQuad = LeanTween.easeOutQuad( 0, 1, arbitraryPoint );
    3. print ( convertedToEaseOutQuad + " - should read 0.77375" );
    Something like that is what I want to do. And this works, just those functions are currently private.

    It would just be a bit easier to have a way to access the LeanTween library of easing functions, rather than copy paste them all into a custom script and change them all to public. :)
     
  5. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Ah I never thought anyone would need the functions for that purpose, but I can't see any reason not to make those public (I will probably not document it though as I think it could cause some confusion for beginners). I'll make them public with my next github update (probably in the next day or two).
     
  6. Essential

    Essential

    Joined:
    Sep 8, 2011
    Posts:
    265
    Heh. Other Tweening systems don't do it either usually, but you've written them all so cleanly I don't want them to go to waste!

    Reading the code, the only one that stumped me was EaseOutQuadOpt (I believe), it seemed like an alternative version of EaseOutQuad?
     
  7. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Thanks! I made them public now :) (it's up on the github page)

    The "Opt" versions of the functions take in the difference (end-beginning) instead of the beginning and end of the tweens. This way the difference doesn't have to be calculated every time (saving an operation), and it actually doesn't use the end value directly in it's calculations so that is not needed.
     
    Essential likes this.
  8. Nims

    Nims

    Joined:
    Nov 11, 2013
    Posts:
    86
    Really like this library, but i have a few questions:
    Can I link a few Tweens into a set which I can repeat? I am interested in making a static class for compound tween which I can loop.

    Also I can't seem to be able to keep LeanTween.isTweening function in the Update() method without getting a null reference exception?
     
    Last edited: Dec 8, 2014
  9. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    623
    Hi,

    I would like to use the Anonymous methods and Tween new Unity UI RectTransform and change the Width and Height (sizeDelta).
    I try to use something like this but it doesnt work.
    How do I do this?


    Code (CSharp):
    1.         //change ui width
    2.         LeanTween.value(gameObject, Vector2a, Vector2b, 1f).setOnUpdate(
    3.             (Vector2 val)=>{UnityEngine.RectTransform image = (UnityEngine.RectTransform)baraui.GetComponent(typeof(UnityEngine.RectTransform));
    4.             image.sizeDelta = val;
    5.             }
    6.         );
     
  10. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Hey Nims,
    Yeah you can put some tweens into a set and repeat them. Here is an example of that:

    LeanTween.delayedCall(gameObject, 2f, ()=>{
    LeanTween.color(gameObject, 0f, 1f);
    LeanTween.color(gameObject, 0f, 1f).setDelay(1f);
    }).setOnCompleteOnStart(true).setRepeat(5);

    Sorry about that error you are getting, it was introduced in the last update to LeanTween. You can get the fix by downloading the latest on Github: https://github.com/dentedpixel/LeanTween . Let me know if that doesn't fix it...
     
  11. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    623
    What about my question?
     
  12. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    It looks like there was no onUpdate method to handle Vector2s. Which was just an oversight (I guess I don't use Vector2s that often either). I have updated the repo on github with a version that supports Vector2s. Your method should now work with that version. Let me know if you have any trouble with it.
     
  13. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    623
    ok thanks
     
  14. highlyinteractive

    highlyinteractive

    Joined:
    Sep 6, 2012
    Posts:
    116
    Hi,

    I've just purchased LeanTweenEditor, but I'm having trouble animating along a path - specifically with setOrient2d

    I've tried every combination of setOrient and setOrient2d with every direction of setAxis, but it only ever seems to rotate my object around its z-axis.

    What am I doing wrong?

    new Vector3[]{new Vector3(-2436f,0f,-30f), new Vector3(-2436f,268f,-30f), new Vector3(-2436f,0f,-30f), new Vector3(-2436f,271f,-30f), new Vector3(-2436f,271f,-30f), new Vector3(-2462.7f,309.8f,-30f), new Vector3(-2432.4f,313.7f,-30f), new Vector3(-2473.4f,298.4f,-30f), new Vector3(-2473.4f,298.4f,-30f), new Vector3(-2467.3f,250.1f,-30f), new Vector3(-2488.1f,280.4f,-30f), new Vector3(-2436.5f,273.7f,-30f), new Vector3(-2436.5f,273.7f,-30f), new Vector3(-2268.9f,364.4f,-30f), new Vector3(-2420.2f,281.8f,-30f), new Vector3(-2243.4f,379.6f,-30f)}
     
  15. HycePT

    HycePT

    Joined:
    Dec 14, 2014
    Posts:
    2
    Hi,

    i just ported my game from iTween to LeanTween, with pretty good results. The performance is much better and the game is overall much faster.

    It did require some adjustments, but i think i managed to solve all problems except one.

    I need to know if there are tweens on going before starting others, and on iTween there was a function which would tell me if there were or not active tweens.

    On LeanTween i didn't have this function, but i adapted one existing which is if the gameobject is tweening or not.

    The end result is the following:
    Code (CSharp):
    1. public static bool isTweening()
    2. {
    3.         if(tweens==null || tweens.Length ==0 ) return false;
    4.  
    5.         for(int i=0; i<= tweenMaxSearch && i<maxTweens; i++)
    6.             if(tweens[i].toggle)
    7.                 return true;
    8.  
    9.         return false;
    10. }
    ( The first condition was added by me, since i got errors when calling the function before any Tween was created).

    But i think it's not properly working, since i'm still getting breaks due to new tweens being added before others finished.

    Is the code right or is there a better way to achieve this ?

    Thanks.
     
  16. Nims

    Nims

    Joined:
    Nov 11, 2013
    Posts:
    86
    Thank you very much for your answer :)
    Wish both delayedCall and setOnCompleteOnStart were documented on the site.
     
    Last edited: Dec 15, 2014
  17. SoftwareLogicAU

    SoftwareLogicAU

    Joined:
    Mar 30, 2014
    Posts:
    34
    Hi,

    In my game I am using LeanTween to move some items along a path to their destination. It's working perfectly but I need to be able to slow them all down (eg: for 5 secs) when a player uses the 'SLOW DOWN' powerup. Is there a way to do this after the objects are already 'tweening'?
    The line of code which moves them is:
    Code (CSharp):
    1. LeanTween.moveSpline(gameObject, LeanTweenTargetPath.vec3, CurrentTravelDuration).setOrientToPath2d(blnOrientToPath).setOnComplete( handleMissedReceptacle );
    Thanks.
     
  18. Evil_Moo

    Evil_Moo

    Joined:
    Jan 23, 2014
    Posts:
    25
    I'm currently using LeanTween in a project that involves quite a lot of tweens starting fairly continuously at somewhat irregular intervals (think 100 objects moving procedurally between 50 different points forever). The project also has time speed controls to speed up and slow down the game using Time.timeScale.

    I found I was getting unexpected results when changing the time scale, with some tweens running faster/slower than others depending on what the time scale was when they actually started and all tweens trying to run for the specified time based on real time rather than 'game time', despite not setting them to use the 'estimated time' option, with time scale changes only factoring in during the movement. I first tried to mitigate the issue by factoring in the time scale to the time the tween would run for, but this would lead to some tweens still using drastically different speeds if there was a sharp change in time scale close to their creation.

    I think I have found a way of getting consistent results for 'game time' centric tweens in a heavily time scale variant environment by changing the LeanTween script line:

    Code (csharp):
    1.     dtActual = Time.deltaTime*Time.timeScale; // old code as found in the script
    2.     dtActual = Time.deltaTime;               // my edited version
    And also removing the following section completely:

    Code (csharp):
    1.           // Set time based on current timeScale
    2.            if( !tween.useEstimatedTime ){
    3.              tween.time = tween.time*Time.timeScale;
    4.            }
    This results in what I would consider expected behaviour from what I have seen, though I can't be sure I haven't broken something. It's possible I'm missing something, or simply 'doing it wrong' somehow, but it seems much more intuitive to me this way.

    Other than that and some fairly frequent garbage collection (presumably a result of almost constantly creating new tweens at the higher time scales), LeanTween seems to be working rather well overall.
     
  19. SoftwareLogicAU

    SoftwareLogicAU

    Joined:
    Mar 30, 2014
    Posts:
    34
    Any ideas? I'm pretty much stuck until I work out how to adjust a tween when it's already in motion.....thanks.
     
  20. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    I just wanted to pop in here to whisper words of encouragement to all developers using—or thinking about using—LeanTween. I've just released a multiplayer card game that uses the library extensively (here's the showcase thread), and it's been rock solid and performant the whole time. Not only has dentedpixel been incredibly responsive to my questions here for years, but he actually suggested we meet up for coffee in my remote Tucson about this time last winter. I've never met a more affable fellow. Thanks!
     
  21. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Hi Emsee,
    Thanks for checking out the LeanTween Editor. The 2d support in the editor has not been fully addressed in the current version. However I have reworked it over the past few days and I should have an update in the stores soon. It's already working very well with my tests, I am just updating other things in the bezier/spline editor before I push the update to the Asset Store. Thanks for your patience!
     
    highlyinteractive likes this.
  22. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Good Point! I'll add that in for the next time I update the documentation :)
     
  23. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Hi HycePT,
    The isTweening issue was something others ran into as well. The current version in the Asset Store should have fixed this issue though (it was just updated last week so you may have missed it). Let me know if you still have this issue with the latest one.
    Thanks!
    Russ
     
  24. SoftwareLogicAU

    SoftwareLogicAU

    Joined:
    Mar 30, 2014
    Posts:
    34
    Hi Russ,

    Can you tell me if there's a way to modify a tween which is already in progress? I want to be able to slow down the movespline tween temporarily when a powerup is used. I can't change the timescale property as I need everything else to remain in normal time. Thanks.
     
  25. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Hey SoftwareLogicAU,
    Yes, that should be possible, sorry for taking so long to respond (Holiday festivities and such have had me busy). If you look at the GeneralCameraShake example, you can see the method stopShake, that slows down the camera shake. You just have to make sure to keep a reference to the tween, and then you can call setTime, or setTo on it (I haven't added this to the documentation yet, as it was still a bit experimental, but it looks to be working well, so I will probably add it in the next update).

    I hope that helps!
    Russ
     
  26. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Hey Evil_Moo!
    That project sounds great! It's always nice to see LeanTween pushed in unexpected ways. I am aware of that limitation, where the tween runs at the timeScale it had when it was first set. I have been meaning to revisit this to see if I could improve upon it. I believe last time I tried to rework this code, it did end up breaking something else :), so proceed cautiously, but I think I should revisit this again as a lot has changed since then. Thanks for the code sample, it will help me get started on looking at this again. I'll let you know if I make any progress on it...
     
  27. SoftwareLogicAU

    SoftwareLogicAU

    Joined:
    Mar 30, 2014
    Posts:
    34
    Hi Russ,

    Thanks for getting back to me. I have looked everywhere through the examples and cannot find the GeneralCameraShake example you mentioned? Can you tell me where I can find it?

    Thanks,
    Glen
     
  28. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Hi Glen,
    You can find it under LeanTween/LeanTweenExamples/Scenes/GeneralCameraShake (make sure you have updated to the latest in the asset store, or grab the latest on github). Here is the script in case you can't find it:

    Code (CSharp):
    1. LTDescr tween1;
    2.     LTDescr tween2;
    3.  
    4.     void Start () {
    5.         // tween1 = LeanTween.rotateAroundLocal( gameObject, Vector3.up, 5f, 2.2f).setEase( LeanTweenType.easeShake ).setLoopClamp().setRepeat(-1);
    6.         tween2 = LeanTween.rotateAroundLocal( gameObject, Vector3.right, 3f, 0.25f).setEase( LeanTweenType.easeShake ).setLoopClamp().setRepeat(-1).setDelay(0.05f);
    7.  
    8.         LeanTween.delayedCall(gameObject, 3f, stopShake);
    9.     }
    10.  
    11.     void stopShake(){
    12.         LeanTween.value(gameObject, 1f, 4.0f, 2.0f).setOnUpdate(
    13.             (float val)=>{
    14.                 //tween1.setTime(val*0.2f);
    15.                 tween2.setTime(val*0.25f);
    16.  
    17.                 //tween1.setTo(Vector3.up*val);
    18.                 tween2.setTo(Vector3.right*(1.0f / val));
    19.             }
    20.         ).setEase(LeanTweenType.easeInSine).setOnComplete(
    21.             ()=>{
    22.                 //tween1.setRepeat(1);
    23.                 tween2.setRepeat(1);
    24.                 Debug.Log("finished");
    25.             }
    26.         );
    27.        
    28.     }
     
  29. SoftwareLogicAU

    SoftwareLogicAU

    Joined:
    Mar 30, 2014
    Posts:
    34
    Thanks Russ. I updated to the latest version from the Asset Store this morning and it's not included (just so you know). I appreciate you including the script here so I can move forward.

    Thanks,
    Glen
     
  30. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Hey Evil_Moo,
    Thanks for the push in the right direction. I modified LeanTween to be reactive to a changing timeScale even after the tween has begun. I also setup my demo scene to GeneralExampleCS to test out this situation. It seems to be working well so far, fingers crossed. Besides your changes I also had to adjust the setDelay method to ignore the timeScale. I'll do some more testing in my games, but I am optimistic this might work. You can grab the latest off of github.

    Cheers,
    Russ
     
  31. Evil_Moo

    Evil_Moo

    Joined:
    Jan 23, 2014
    Posts:
    25
    Good to hear, and I'm glad I could be of some assistance. I might have a play around with the updated version over Christmas and see if I can't find other ways to break it. :p
     
    dentedpixel likes this.
  32. AbgaryanFX

    AbgaryanFX

    Joined:
    Jan 9, 2010
    Posts:
    167
    Hi @dentedpixel !

    Why this part of code doesn't work ?
    GameObject are not being destroyed :/

    Code (CSharp):
    1.  
    2.          foreach (var go in DragObjList)
    3.         {
    4.             print("should delete: " + go.name);
    5.             LeanTween.move(go, go.transform.position + new Vector3(0f, Random.Range(-15f, -20f), 0f), 1f)
    6.                 .setEase(LeanTweenType.easeInCubic)
    7.                 .setOnComplete(() =>
    8.                 {
    9.                     Destroy(go);
    10.                 })
    11.                 .setDelay(Random.Range(0f, .3f));
    12.         }
    13.  
     
  33. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Hey Artyom,
    That LeanTween code works for me when I just run it on it's own. I have a feeling the issue is with how you are traversing the list, if you start deleting objects in a list while you are traversing that list, screwy things can happen. When I have had to do this in the past, I have had better luck with this type of for loop:

    Code (CSharp):
    1. for (i=pts.Length-1; i>=0; i--) {
    2.     DestroyImmediate( pts[i] );
    3. }
    Actually now that I look at it more, I think the reference it may have in the inline onComplete to the go object might have changed from when you call it, to be destroyed. There is actually a destroyOnComplete property that you can set, like setDestroyOnComplete( true ), which should do the behavior you want as well...

    I hope that makes sense! I know I sort of rambled.
     
    AbgaryanFX likes this.
  34. gallenwolf

    gallenwolf

    Joined:
    Mar 11, 2012
    Posts:
    118
    Hi!
    Does one of the included examples have a demonstration of how to tween a rotate and move at the same time? I can't figure it out... Thanks!
     
  35. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Hi Gallenwolf,
    I am not sure if that is provided, but it should be pretty easy, it just requires two tweens like:

    LeanTween.move(gameObject, new Vector3(2f,3f,4f), 2f).setEase(LeanTweenType.easeInOutQuad);
    LeanTween.rotateAround(gameObject, Vector3.up, 360f, 2f).setEase(LeanTweenType.easeInOutQuad);

    Let me know if you have any trouble with that.
    Russ
     
  36. gallenwolf

    gallenwolf

    Joined:
    Mar 11, 2012
    Posts:
    118
    Hi Russ!
    Thanks, that worked! Cheers!
     
    dentedpixel likes this.
  37. AbgaryanFX

    AbgaryanFX

    Joined:
    Jan 9, 2010
    Posts:
    167
    Great and complete answer @dentedpixel ! destroyOnComplete is the solution :)
    LeanTween is MOST valuable unity extension for me ! ;)

    do you agree with these results ?
    http://www.mophogames.com/dftween-a-better-tween-system/

    Thanks a lot !
     
    dentedpixel likes this.
  38. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Awesome! I am glad that worked. I have been meaning to test out some of the latest engines to compare performance. Most of them when they claim to have any edge it is only slightly faster than LeanTween, and who knows how robust their engine is, I have added a lot of functionality over the years. A lot of the new systems seem to be copying the methods I used to get the really great performance, which I guess is to be expected. Since DFTween seems to be a closed beta, I can't really dispute the results...

    I am not really that concerned with LeanTween being *the fastest* out there, if another engine beats it by a nanosecond in some tests, so be it. Now my focus is more on it being feature rich and stable (and still super fast!).

    That being said, I should update my tests I have done earlier to see the latest benchmarks against some of the newer engines :) There is always room for improvement.
     
  39. Nims

    Nims

    Joined:
    Nov 11, 2013
    Posts:
    86
    Quick question about how to tween the alpha of the Image component in the new uGUI?
    Can it be done directly or do I have to use the canvas group?
     
  40. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    You should be able to call alpha on the RectTransform object, this will alpha the included image component, like:

    LeanTween.alpha(gameObject.GetComponent<RectTransform>(), 0.5f, 1f).setDelay(1f)
     
  41. Nims

    Nims

    Joined:
    Nov 11, 2013
    Posts:
    86
    Thank you for such a quick response!
     
  42. HycePT

    HycePT

    Joined:
    Dec 14, 2014
    Posts:
    2
    Hi dentepixel,

    thank you for the reply.

    I just reviewed the updated code and yes, i know the problem that existed on the isTweening regarding when there are no objects, but what i'm trying to achieve is having a isTweening fucntion without arguments. Right now, it requires a gameobject or some other argument to know if a specific object isTweening.
    I need to know, if LeanTween is tweening anything at all.
     
  43. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Hi HycePT,
    Ah, I understand now. There wasn't an easy way to do that, but i added the empty isTweening method to the latest LeanTween up on Github. Let me know if that doesn't work for you.

    Cheers,
    Russ
     
  44. Nims

    Nims

    Joined:
    Nov 11, 2013
    Posts:
    86
    Well this doesn't seem to work, using the latest LeanTween from the asset store...there is no version of LeanTween.alpha which take a RectTransform?
     
  45. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Hmmm, possibly it didn't make it into that latest release on the Asset Store. It is definitely implemented on the version that is up on Github, if you want to grab it there.
     
  46. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    Please change this piece o code :

    Code (csharp):
    1.  
    2. #if UNITY_3_5 || UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2
    3.                     if(trans.gameObject.renderer){
    4.                         this.from.x = trans.gameObject.renderer.material.color.a;
    5.                     }else if(trans.childCount>0){
    6.                         foreach (Transform child in trans) {
    7.                             if(child.gameObject.renderer!=null){
    8.                                 Color col = child.gameObject.renderer.material.color;
    9.                                 this.from.x = col.a;
    10.                                 break;
    11.                           }
    12.                         }
    13.                     }
    14.                     break;  
    15.                 #else
    16.                     SpriteRenderer ren = trans.gameObject.GetComponent<SpriteRenderer>();
    17.                     if(ren!=null){
    18.                         this.from.x = ren.color.a;
    19.                     }else if(trans.gameObject.renderer!=null){
    20.                         if(trans.gameObject.renderer.material.HasProperty("_Color")){
    21.                             this.from.x = trans.gameObject.renderer.material.color.a;
    22.                         }else{
    23.                             if(trans.gameObject.renderer.material.HasProperty("_TintColor")){
    24.                                 {
    25.                                     Color col = trans.gameObject.renderer.material.GetColor("_TintColor");
    26.                                     this.from.x = col.a;
    27.                                 }
    28.                             }
    29.                     }
    30.  
    It now checks if TintColor exists... I were having problems because of this.

    Thanks!
     
  47. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Trying to use LeanTween.color(gameObject: GameObject, to:Color, time:float)

    Getting this error:
    `LeanTween' does not contain a definition for `color'
     
  48. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Hi there,
    That method should definitely be there. Try looking at the TestPunch example, there is color tweening code in there for when you hold down the 'C' key.

    Maybe you are using a very out-of-date version? You can get the latest on Github: github.com/dentedpixel/LeanTween
     
  49. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Yes, that was an old version from the Asset Store. Thanks!

    Actually, I'm trying to tween alpha of a Unity UI panel. LeanTween.alpha() didn't do that, so I wanted tor try LeanTween.color(). It also doesn't work. The UI panel uses Canvas Renderer. Is that the reason why LeanTween.alpha() doesn't work?
     
  50. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    Hmmm what part of the panel exactly are you trying to tween? It works with the UIImage component or the text portion (with textAlpha or textColor). If there is another property in the UI Panel that can affect the alpha/color let me know. Is this something you are able to do manually? If so than it could be added to LeanTween.

    For an example of tweening a color with the new UI check out the UIBasicsCS scene from the github page (In 4.6_Examples.zip).

    Thanks,
    Russ