LeanTween Ignoring Parameters
I just started using LeanTween today, but I have been having a lot of issues with it because it seems to be ignoring target values and time values in its operations. Whenever I enter any values into a LT line, in practice, it only does a fraction of that, and always does it in a near-imperceptably short period of time, no matter what time value I enter, even if it is very large. Here is some sample code that I have, set to scale a UI image when the player triggers a collider:
public void ScreenCookieScaleLT()
{
if (CollisionReady == true)
{
CollisionReady = false;
LeanTween.scale(gameObject.GetComponent<RectTransform>(), TargetScale, 30.0f);
LeanTween.delayedCall(gameObject, 100.0f, () => {
CollisionReady = true;
Debug.Log(transform.localScale);
LeanTween.scale(gameObject.GetComponent<RectTransform>(), DefaultScale, 30.0f);
});
}
}
Any ideas on how to fix this?
I've never used LeanTween, but the code looks ok to me. Is it possible that the gameObject this script is attached to gets destroyed shortly after?
Your answer
![](https://koobas.hobune.stream/wayback/20220612100210im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Hover car lean limiting turning angle 2 Answers
Gokit tween path position on different screen sizes 0 Answers
LeanTween - For Loop Help 0 Answers
Why is this not working? (Lean feature) 0 Answers
Itween paths and generating nodes won't work. please help 1 Answer