Git Product home page Git Product logo

animation-sequencer's Introduction

Animation Sequencer

GitHub license

GitHub issues GitHub pull requests GitHub last commit

GitHub followers Twitter Follow

I LOVE Tween, I love DOTween even more! But having to wait for a recompilation every time you tweak a single value on some animation it's frustrating! Even more complicated is properly have to visualize the entire animation on your head and having to wait until you reach your animation to see what you have done! That's why I created the Animation Sequencer, it is (cloned) HEAVILY INSPIRED from Space Ape amazing Creative Engineering: Balancing & Juicing with Animations presentation.

This is still in heavy development, please use it carefully

Example Example

Features

  • Allow you to create a complex sequence of Tweens/Actions and play on Editor Mode!
  • User Friendly interface with a lot of customization
  • Easy to extend with project specific actions
  • Chain sequences and control entire animated windows with a single interface
  • Searchable actions allowing fast interactions and updates
  • Can be used for any type of Objects, UI or anything you want!

Built in Steps

  • Tween Target
    • DOAnchoredPosition
    • DOMove
    • DOScale
    • DORotate
    • DOFade (Canvas Group)
    • DOFade (Graphic)
    • DOPath
    • DOShake (Position/Rotation/Scale)
    • DOPunch (Position/Rotation/Scale)
    • DOText (TextMeshPro Support)
    • DOFill
  • Play Particle System
  • Play Animation Sequencer

How to use?

  • Animation Sequencer rely on DOTween for now, so it a requirement that you have DOTween on your project with properly created asmdef for it (Created by the DOTween setup panel)
  • Add the Animation Sequencer to any GameObject and start your animation!
  • Using the + button under the Animation Steps you can add a new step
  • Select Tween Target
  • Use the Add Actions to add specific tweens to your target
  • Press play on the Preview bar to view it on Editor Time.
  • To play it by code, just call use animationSequencer.Play();

FAQ

How can I create my custom DOTween actions? Lets say you want to create a new action to play a specific sound from your sound manager on the game, you just need to extend the `AnimationStepBase`
[Serializable]
public class PlayAudioClipAnimationStep : AnimationStepBase
{
    [SerializeField]
    private AudioClip audioClip;

    //Duration of this step, in this case will return the length of the clip.
    public override float Duration => audioClip.length;
    //This is the name that will be displayed on the + button on the Animation Sequencer
    public override string DisplayName => "Play Audio Clip";

    //Here is actually the action of this step
    public override void Play()
    {
        base.Play();
        AudioManager.Play(audioClip);
    }
}
I have my own DOTween extensions, can I use that?

Absolutely! The same as the step, you can add any new DOTween action by extending DOTweenActionBase. In order to avoid any performance issues all the tweens are created on the PrepareToPlay method on Awake, and are paused.

[Serializable]
public sealed class ChangeMaterialStrengthDOTweenAction : DOTweenActionBase
{
    public override string DisplayName => "Change Material Strength";
        
    public override Type TargetComponentType => typeof(Renderer);

    [SerializeField, Range(0,1)]
    private float materialStrength = 1;

     public override bool CreateTween(GameObject target, float duration, int loops, LoopType loopType)
     {
        Renderer renderer = target.GetComponent<Renderer>();
        if (renderer == null)
            return false;

        TweenerCore<float, float, FloatOptions> materialTween = renderer.sharedMaterial.DOFloat(materialStrength, "Strength", duration);
        
        SetTween(materialTween, loops, loopType);
        return true;
    }
}

custom-tween-action

Using custom animation curve as easing

You can use the Custom ease to define an AnimationCurve for the Tween.

custom-ease

What are the differences between the initialization settings
  • None Don't do anything on the AnimationSequencer Awake method
  • PrepareToPlayOnAwake This will make sure the Tweens that are from are prepared to play at the intial value on Awake.
  • PlayOnAwake Will play the tween on Awake.*

System Requirements

Unity 2018.4.0 or later versions

How to install

Add from OpenUPM | via scoped registry, recommended

This package is available on OpenUPM: https://openupm.com/packages/com.brunomikoski.animationsequencer

To add it the package to your project:

  • open Edit/Project Settings/Package Manager
  • add a new Scoped Registry:
    Name: OpenUPM
    URL:  https://package.openupm.com/
    Scope(s): com.brunomikoski
    
  • click Save
  • open Package Manager
  • click +
  • select Add from Git URL
  • paste com.brunomikoski.animationsequencer
  • click Add
Add from GitHub | not recommended, no updates :(

You can also add it directly from GitHub on Unity 2019.4+. Note that you won't be able to receive updates through Package Manager this way, you'll have to update manually.

  • open Package Manager
  • click +
  • select Add from Git URL
  • paste https://github.com/brunomikoski/Animation-Sequencer.git
  • click Add

animation-sequencer's People

Contributors

brunomikoski avatar qwe321 avatar

Watchers

 avatar

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.