Giter VIP home page Giter VIP logo

Comments (8)

eduardhasanaj avatar eduardhasanaj commented on July 17, 2024 2

Yeah. Looks like it is specific to my scenario only. I need OnComplete so will add booleans for every animation. Anyway thank you for your help.

from dotween.

Demigiant avatar Demigiant commented on July 17, 2024 1

Hi,

By design choice, Complete only completes animations, not callbacks. I thought about that a little more after you posted this, but logic-wise I believe it's better this way. The only callback that will work is OnComplete, so you could use this workaround instead:

Sequence s = DOTween.Sequence()
    .OnComplete(()=> Debug.Log("This will work"));
s.Complete();

from dotween.

Demigiant avatar Demigiant commented on July 17, 2024 1

Hi,

Forgot to answer here too, but just for reference the new update of DOTween includes an optional "withCallbacks" parameter to the Complete methods.

from dotween.

Puutalo avatar Puutalo commented on July 17, 2024

Hi, thanks for the response, however, OnComplete isn’t suitable workaround in my scenario.

Basically, I have animation that also includes several callbacks in specific order (for operations such as changing sprites etc). Now I want to allow players to skip the animation. OnComplete won’t work because the they need to play in order.

Any ideas how to do this with DOTween?

from dotween.

eduardhasanaj avatar eduardhasanaj commented on July 17, 2024

Please can you do that also for tweeners? I needed to disable callbacks

from dotween.

Demigiant avatar Demigiant commented on July 17, 2024

Hi,
It already works with Tweeners:
myTweener.Complete(true);
If instead you just want to disable callbacks, you just have to call Complete without parameters.

from dotween.

eduardhasanaj avatar eduardhasanaj commented on July 17, 2024

Sorry but I just check it, OnComplete callbacks is getting called after I call Complete().
I have Dotween Pro 0.9.690
Should I download new version to get it fixed?

from dotween.

Demigiant avatar Demigiant commented on July 17, 2024

Ah, wait, I misunderstood. OnComplete is the only callback that gets called every time, yes (because 99% of the times that's what one wants :P). In your case, you can delete the OnComplete callback completely:

myTween.OnComplete(null);
myTween.Complete(); // No callback happens

from dotween.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.