Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LeanTween.delayedCall does not clear when tween finishes #165

Open
S0FTS4M opened this issue Aug 1, 2021 · 0 comments
Open

LeanTween.delayedCall does not clear when tween finishes #165

S0FTS4M opened this issue Aug 1, 2021 · 0 comments

Comments

@S0FTS4M
Copy link

S0FTS4M commented Aug 1, 2021

Code With limit Exceeded Error
LTDescr descr = LeanTween.delayedCall(delay, () => { LeanTween.rotateAround(rect, Vector3.forward, 20, .2f) .setEase(curve) .setOnComplete(() => rect.localRotation = Quaternion.identity ); }).setRepeat(-1);

Code without any errors
LTDescr descr = LeanTween.delayedCall(rect.gameObject, delay, () => { LeanTween.rotateAround(rect, Vector3.forward, 20, .2f) .setEase(curve) .setOnComplete(() => rect.localRotation = Quaternion.identity ); }).setRepeat(-1);

public static LTDescr delayedCall( float delayTime, Action callback)
When I use this one, after a while I get an error which says LeanTween tween limit exceeded. When we call this, it uses the gameObject that created by leantween.

public static LTDescr delayedCall( GameObject gameObject, float delayTime, Action callback)
When I try this one, It works fine. No errors.

I followed the code but there is only one difference and that is the gameObject reference as far as I understand. Am I missing something or is there a bug here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant