SpriteAnimator 2D Tookit


Sprite Animation 2D-Tool
Sprite Animator is a tool that allows you to manage our animations based on SpriteSheet. Its pleasant and minimalistic intuitive interface allows us to create our animations quickly and in a controlled manner.

Features

  • Optimal Tree Orderable
  • Preview Folder
  • Preview Animation
  • Drag and Drop
  • Order by name
  • Direction
  • Forward
  • Backward
  • Mode
  • Normal
  • Loop
  • PingPong
  • Pivots.

Folders and Animations

An optimal and lightweight folder system was designed to maintain a structure and organization within the project.
Full functions to work with the mouse, drag and drop to organize and f2 to rename folders or animations.
The folder structure must be taken into account in run time for the execution of the animations.
Simple and elegant.

Preview Folders

Preview Folder
Preview all the animations contained in a folder with a powerful search engine to facilitate the maintenance of our projects.

Player and Settings

Complete configuration system for our animations, allowing to configure the type of animation, the direction, the time of each frame and the pivots, always keeping in mind the configuration of the render works in a comfortable way. The representation of the Sprite is self-scaled to always work with a correct resolution without losing the actual size of the sprites.The timeline allows you to delete, change and add frames at ease, with a quick sort order by name to speed up this task.

Pivots

Working with animations based on SpriteSheets often gives us headaches to know where a certain pixel of our character is located, that is why, SpriteAnimator has a system of pivots that fit in each frame to have a unique precision for our games .

How to integrate this tools in my projects?

The tool is designed not to be invasive in third-party projects for this reason, this same application has only 4 files (2 .dll and 2 .assets) in this way we ensure that the integration will not be unpleasant. Once the animations have been created, a component designed for the reproduction of the animations within a SpriteRenderer can be used by SpriteAnimatorController.

How to play an animation?

To play an animation you can use SpriteAnimatorController (ref) .PlayAnimation ("PathOfAnimation"). SpriteAnimatorController contains a reference to SpriteAnimatorPlayer for more precise control of the animation playback.
SpriteAnimatorPlayer has multiple states -
  • SetFrame,
  • Update,
  • NextFrame,
  • BackFrame,
  • Finish,
  • Reset,
  • TimeOut,
  • FinishForward,
  • FinishBackward,
  • Pause,
  • Stop,
  • NonAnimation,
  • SetFrameAffter,
Example
using SpriteAnimatorRuntime; using UnityEngine; public class PlayerGraphics : MonoBehaviour { [SerializeField] private PlayerController m_controller = null; [SerializeField] private SpriteRenderer m_spriteRenderer = null; [SerializeField] private SpriteAnimatorController m_animator = null; public string AnimationSlide = "Player/Stick/Slide"; public string AnimationDashLoop = "Player/Stick/DashLoop"; public string AnimationRun = "Player/Stick/Run"; public string AnimationIdle = "Player/Stick/Idle"; public string AnimationSlideWall = "Player/Stick/SlideWall"; public string AnimationWallRun = "Player/Stick/WallRun"; public string AnimationJump = "Player/Stick/Jump"; private void Update() { if (m_controller.IsBottomContact) { if (m_controller.Velocity.x > 0 && m_controller.AxisDirection < 0) { m_animator.PlayAnimation(AnimationSlide); } else if (m_controller.Velocity.x < 0 && m_controller.AxisDirection > 0) { m_animator.PlayAnimation(AnimationSlide); } else { if (Mathf.Abs(m_controller.Velocity.x) > .02f) { if (InputControl.GetJoystick(m_controller.PlayerJoystick).GetButton(JoystickButton.ButtonB)) { m_animator.PlayAnimation(AnimationDashLoop); } else { m_animator.PlayAnimation(AnimationRun); } } else { m_animator.PlayAnimation(AnimationIdle); } } } else { if ((m_controller.IsLeftContact && m_spriteRenderer.flipX) || (m_controller.IsRightContact && !m_spriteRenderer.flipX)) { if (m_controller.Velocity.y < 0) { m_animator.PlayAnimation(m_controller.InvertPhisics ? AnimationWallRun : AnimationSlideWall); } else if (m_controller.Velocity.y > 0) { m_animator.PlayAnimation(m_controller.InvertPhisics ? AnimationSlideWall : AnimationWallRun); } } else { m_animator.PlayAnimation(AnimationJump); } } m_spriteRenderer.flipX = m_controller.IsFlip; m_spriteRenderer.flipY = m_controller.InvertPhisics; } }

Soon video tutorial explaining events and pivots.

SpriteAnimator Management

Comentarios