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

Dotween Execution Order not Aligning with Coroutines #693

Open
amaljoy opened this issue Sep 14, 2024 · 0 comments
Open

Dotween Execution Order not Aligning with Coroutines #693

amaljoy opened this issue Sep 14, 2024 · 0 comments

Comments

@amaljoy
Copy link

amaljoy commented Sep 14, 2024

Hi, I am kind of bit confused here. Why debug.log in IEnumerator is printing first than the one in sequence.Onstart. Is there a way to execute tween in current execution order? It is really important in my current project to make it execute in correct order.
`
using DG.Tweening;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;

public class Follower : MonoBehaviour
{
private void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
PlayAnim();
StartCoroutine(Example());
}

}
IEnumerator Example()
{
    Debug.Log("Function started");
    yield return new WaitForEndOfFrame();
}

Sequence sequence;
public void PlayAnim()
{
    sequence = DOTween.Sequence();
    sequence.OnStart(() => { Debug.Log("Sequence started"); });
    sequence.Play();
}

}
`

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