Info
- Simple animations without an Animator, built in the inspector. Module
Polis.Core.Tweening (Packages/PolisCore/Tweening)
- Uses DoTween as the animation backend and Odin Inspector for the editor
- No coding needed for common cases. Any property DOTween supports can be animated, and you can add your own actions
- Animations can be saved as
TweenAnimationPreset assets and reused
- Animations can be previewed in edit mode, without entering play mode
Usage
- Add
TweenAnimationController to the root of the animated hierarchy
- Add segments to the sequence with the + button
- Play from the inspector controls, from Callbacks, or from code (
Play(), Pause(), Resume(), Rewind(), Complete(), Kill(bool complete = false))

Main parts
TweenAnimationController - component that plays a sequence. Use it when the animation lives on its own game object
TweenAnimationField - the same thing as a serializable field. Embed it in your own component and play it from code
TweenSequence - ordered list of ITweenSegments ([SerializeReference]). Used by the controller, the field and presets
ATweenObjectAction<T> - one DOTween call on a target of type T (move, fade, color...). Has Delay, Duration and Ease
TweenAnimationPreset - ScriptableObject holding a TweenSequence. Targets are TweenObjectReference slots instead of scene objects
TweenToggleState - AToggleState that plays an enable or disable animation (see State Handling)
TweenSelectableTransition - animated button and toggle states
Options