dotween icon indicating copy to clipboard operation
dotween copied to clipboard

Dotween Update and Start CallBack

Open wujiaze opened this issue 2 years ago • 1 comments

    void Update()
    {
      if (Input.GetKeyDown(KeyCode.E))
        {
            // blackTrans is a cube
            Tween t = blackTrans.DOMove(new Vector3(5, 5, 5), 2)
                .SetDelay(5)
                .OnStart(TweenStart)
                .OnComplete(TweenComplete)
                .OnUpdate(TweenUpdate);
            Sequence seq = DOTween.Sequence();
            seq.Append(t)
                .PrependInterval(5)
                .AppendInterval(5)
                .SetDelay(5, false) 
                .OnStart(SequenceStart)
                .OnComplete(SequenceComplete)
                .OnStepComplete(SequenceStepComplete)
                .OnUpdate(SequenceUpdate)
                .SetLoops(2);
         }
    }
    private void TweenStart()
    {
        print("OnTweenStart");
    }
    private void TweenComplete()
    {
        print("OnTweenComplete");
    }
    private void TweenUpdate()
    {
        print("TweenUpdate");
    }
    private void SequenceStart()
    {
        print("OnSequenceStart");
    }

    private void SequenceStepComplete()
    {
        print("OnSequenceStepComplete");
    }

    private void SequenceComplete()
    {
        print("OnSequenceComplete");
    }

    private void SequenceUpdate()
    {
        print("SequenceUpdate");
    }

This is the flowchart I built ,the issues is the red texts image This is the Console. There's an TweenUpdate there image

wujiaze avatar Apr 07 '23 10:04 wujiaze

DotweenPro 1.0.335

wujiaze avatar Apr 07 '23 10:04 wujiaze