Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Magic Tween - Extremely fast tween library implemented in ECS

Discussion in 'Assets and Asset Store' started by annulusgames, Sep 9, 2023.

  1. annulusgames

    annulusgames

    Joined:
    Sep 24, 2020
    Posts:
    6
    Magic Tween is an extremely fast tween library implemented in ECS.



    Features
    • High-performance tweening library implemented in ECS.
    • Add extension methods compatible with many components.
    • Tween anything with Tween.To.
    • Apply various settings using method chaining.
    • Create complex animations with Sequences.
    • Add processing via callbacks.
    • Support for tweening TextMesh Pro.
    • Support for conversion to Observable with UniRx.
    • Support for async/await with UniTask.
    • Even higher-performance implementation for ECS.
    Performance



    When tweening float values of regular classes using Tween.To(), Magic Tween operates more than 2 to 5 times faster than other libraries.
    When tweening float values within ECS components using Tween.Entity.To(), it is possible to achieve even higher performance.

    This library is free and opensource on GitHub. Have fun!
    https://github.com/AnnulusGames/MagicTween
     
    saskenergy, thelebaron, Enzi and 5 others like this.
  2. annulusgames

    annulusgames

    Joined:
    Sep 24, 2020
    Posts:
    6
    Released v0.1.1. The change log is below.
    - Renewed tween components
    - Improved performance
    - Fixed minor bugs

    Although there are no new features, the internal structure has been redesigned to further improve performance. Specifically, the creation speed of Tween.Entity.To has been improved by about 40%, and the performance of Sequence has also been slightly improved.
    I would like to further improve performance and enhance functionality. I would be happy if you could let me know if you have any opinions or problems.
     
    saskenergy and alsomitra like this.
  3. digiwombat

    digiwombat

    Joined:
    Sep 26, 2013
    Posts:
    44
    Love to see another FOSS tweening solution. I'm noticing a lot of syntax similarity, but is this a drop-in replacement for DOTween? If no, which pieces need changing, if you know off the top of your head?
     
  4. annulusgames

    annulusgames

    Joined:
    Sep 24, 2020
    Posts:
    6
    Although not completely replaceable, it can be used as an alternative to DOTween in most situations. I used to use DOTween Pro for my projects, but now I have replaced all the relevant parts with Magic Tween and it is working without any problems.

    However, there are some features that are incompatible or unsupported compared to DOTween.

    - The behavior of OnPlay and OnStart is quite different from DOTween.
    - There is no extension method equivalent to DOJump.
    - You cannot rewind tween or change the playback direction.
    - There is no From method. However, you can specify the starting value when creating the tween, and SetInvert() is also available.
    - SetUpdate does not exist, and it is impossible to change the update timing.
    - In order to use async/await, UniTask must be installed. (If you want to use async/await in Unity, using the regular Task class is not good for performance.)
    - Magic Tween's TweenParams, SetAs(), and extension methods for coroutines (WaitForComplete, WaitForKill, etc...) are currently experimental and will not work correctly. These will be supported in future updates.
    - There is no visual editor. (currently under development)
     
  5. digiwombat

    digiwombat

    Joined:
    Sep 26, 2013
    Posts:
    44
    Thanks, that's basically all the stuff I wanted to know. It'll definitely help speed up switching on our current project. :D
     
  6. calabi

    calabi

    Joined:
    Oct 29, 2009
    Posts:
    232
    This is awesome, thanks. I've been waiting for something like this and I new it would be performant.