Skip to content

Unity Package for animating a set of UI element to different states.

License

Notifications You must be signed in to change notification settings

abrusle/unity-ui-state-animator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Objective

Create a framework that handles animating between multiple given UI states. Provide the workflow and tools for creating and editing UI states (RectTransform properties, etc.) while allowing a preview of those changes in the scene. The tools should feature a set of customizable properties such as animation curve, duration for each transition.

Implementation Idea 1

  • Have the user define ui states using animation clips (source animation clips). The properties of each state are defined by the keyframes in the first frame of the source clips.
  • These clips are then grouped in a ScriptableObject which generates:
    • Animation clips interpolating between the given states
    • An animation controller able to transition between states
  • The SO can take parameters to generate the transition animations such as: animationCurves and durations.

Limitations

  • Detecting when the user changes keyframes in the source animation clips.
  • Previewing ui states in the scene when editing source animation clips.
    • the user could add an Animation component in the scene and preview the clip directly. This is far from ideal because the animation component might conflict with the Animator (Animation Controller) used for runtime animation
  • Allowing animated properties to be dynamically changed via script at runtime (e.g. responsive transfroms)
    • Can be solved by allowing the user to extract the generated asset from the SO and make further changes to them.

About

Unity Package for animating a set of UI element to different states.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published