Download (Unity Package)
January 14, 2026 ยท View on GitHub
Coded by Amaryne B.
A simple way to animate object motions in Unity. Heavily inspired by the DoTween API.
Download (Unity Package)
This version was made for Unity 6
Guide Overview
Introduction
Animations
Miscellaneous
Introduction
Install
In order to install the Ama Motion Automatiser to one of your project, please download the package available on this Github page.
Dropping it in your Unity project should be enough to start using the AMA.
General Knowledge
AMA functions usually follow this pattern:
transform.AMAmove(Axis.x, // aka '_selectedAxis' -> Axis to animate on
1f, // aka '_endPos' -> Final position
2f); // aka '_duration' -> Animation duration
Features can be added to an animation. For more informations, please check the Miscellaneous section.
How to use
There are two main ways of using the AMA:
1) In code
At the top of your .cs file, add this line:
using AMA;
The Ama Motion Automatiser's functions are extension functions, which means they are to be called from a Unity Object.
Example with the AMAMove function:
transform.AMAmove(Axis.x, 1f, 2f);
Here, the function is called via Unity's
Transform. The functions available depends on the object's type (Transform,Quaternion,Color, ...).
Features are available to extend the control over your animation. They are extension functions of the Animation object.
Example with adding a curve to the animation:
transform.AMAmove(Axis.x, 1f, 2f).SetCurve(Curves.Back_Out);
You can add as many feature as you want. (Feature order doesn't matter)
transform.AMAmove(Axis.x, 1f, 2f).From(Vector3.zero).SetCurve(Curves.Back_Out).SetDelay(5f);
2) With a component
Creating an animation can be as simple as adding a component to an object (directly inside Unity).
Components are named AMA Animation_<AnimationType>.
Every feature is available on the animation's component.
Warning
Make sure to use the right component for your animation needs. For example, some components work only with a RectTransform.
Animations
Move
AMAmove is used to move an object via its transform's position.
Code usage:
Multiple versions are available, depending on your needs:
| Function name | Value changed |
|---|---|
AMAmove | transform.position |
AMAlocalMove | transform.localPosition |
Example:
transform.AMAmove(Axis.x, // aka '_selectedAxis' -> Axis to animate on | AMA.Axis
1f, // aka '_endPos' -> Final position | float or Vector3
2f); // aka '_duration' -> Animation duration | float
Tip
In code, the _endPos parameter can be either a float or a Vector3!
Version with component:
Move UI
AMAmove is used to move an object via its rectTransform's position.
Code usage:
Multiple versions are available, depending on your needs:
| Function name | Value changed |
|---|---|
AMAmove | rectTransform.position |
AMAlocalMove | rectTransform.localPosition |
AMAanchoredPosMove | rectTransform.anchoredPosition |
AMAanchoredPos3dMove | rectTransform.anchoredPosition3D |
Example:
GetComponent<RectTransform>().AMAanchoredPosMove(Axis.x, // aka '_selectedAxis' -> Axis to animate on | AMA.Axis
1f, // aka '_endPos' -> Final position | float or Vector3
2f); // aka '_duration' -> Animation duration | float
Tip
In code, the _endPos parameter can be either a float or a Vector3!
Version with component:
Rotate
AMArotate is used to rotate an object via its transform's rotation.
Code usage:
Multiple versions are available, depending on your needs:
| Function name | Value changed |
|---|---|
AMArotate | transform.rotation |
AMArotateEuler | transform.rotation.eulerAngles |
AMAlocalRotate | transform.localRotation |
AMAlocalRotateEuler | transform.localRotation.eulerAngles |
Example:
transform.AMArotate(Axis.x, // aka '_selectedAxis' -> Axis to animate on | AMA.Axis
1f, // aka '_endRotation' -> Final rotation | float or Quaternion
2f); // aka '_duration' -> Animation duration | float
Tip
In code, the _endPos parameter can be either a float or a Quaternion/Vector3!
Version with component:
Scale
AMAscale is used to scale an object via its transform's scale.
Code usage:
Example:
transform.AMAscale(Axis.x, // aka '_selectedAxis' -> Axis to animate on | AMA.Axis
1f, // aka '_endScale' -> Final scale | float or Vector3
2f); // aka '_duration' -> Animation duration | float
Tip
In code, the _endPos parameter can be either a float or a Vector3!
Version with component:
Fade
AMAfade is used to fade a component's color between two colors.
You can fade color on UnityEngine.UI.Image, TMPro.TMP_Text and Material.
Fading on alpha only is also possible thanks to the AMAfadeAlpha function.
Code usage:
Multiple versions are available, depending on your needs:
| Function name | Value changed |
|---|---|
AMAfade | Material.color or UnityEngine.UI.Image.color or TMP_Text.color |
AMAfadeAlpha | Material.color.a or UnityEngine.UI.Image.color.a or TMP_Text.color.a |
Example:
image.AMAfade(Color.red, // aka '_endColor' -> Final color | UnityEngine.Color
2f); // aka '_duration' -> Animation duration | float
Version with component:
Shake
AMAshake is used to create a 'shake' effect on an object's transform's position.
This function comes with two more parameters, such as the Shake Radius and the Delay Between Shakes.
Code usage:
Example:
transform.AMAshake(Axis.All, // aka '_selectedAxis' -> Axis to animate on | AMA.Axis
5f, // aka '_shakeRadius' -> Radius in which the object can be shaken in | float
2f, // aka '_duration' -> Animation duration | float
0.01f); // OPTIONAL, default = 0.0f | aka '_delayBetweenShakes' -> Delay between each shake | float
Version with component:
Miscellaneous
Set Curve
.SetCurve is an extension method of the Animation object.
This function sets the curve used to moderate the animation's movement.
Robert Penner's curves are predefined in the AMA and are available to use. They are stored in the AMA.Axis enum.
You can also use custom curves for animations thanks to Unity's AnimationCurve.
Code usage:
transform.AMAmove(Axis.x, 1f, 2f).SetCurve(Curves.Back_Out); // aka '_curve' -> Selected curve | AMA.Curves or UnityEngine.AnimationCurve
Version with component:
A Curve Selector is also available with the 'Select curve' button for easier preview.
Snap to end value
_snapToEndValue is an optional argument present at the end of every AMA animation function.
It is used to force apply the animation's end value to the object when the animation ends.
Important
This variable is defaulted to true.
Code usage:
transform.AMAmove(Axis.x, 1f, 2f, false); // aka '_snapToEndValue' -> Snaps to end value | bool
Version with component:
On Start
.OnStart is an extension method of the Animation object.
This method calls a given function when the animation starts.
Note
If the animation has a delay, it will be considered as 'started' when the delay ends.
Code usage:
transform.AMAmove(Axis.x, 1f, 2f).OnStart(() => Debug.Log("Hello world!")); // aka '_action' -> Function to call | AMA.MAfunction (delegate void)
Version with component:
On End
.OnEnd is an extension method of the Animation object.
This method calls a given function when the animation ends.
Code usage:
transform.AMAmove(Axis.x, 1f, 2f).OnEnd(() => Debug.Log("Hello world!")); // aka '_action' -> Function to call | AMA.MAfunction (delegate void)
Version with component:
From
.From is an extension method of the Animation object.
This method changes the starting value of the animation. It overrides whatever the initial value is.
Code usage:
transform.AMAmove(Axis.x, 1f, 2f).From(Vector3.zero);
Warning
For now, the value to give to the .From method depends on the Animated Object's type.
e.g. for AMAmove it's a Vector3
Version with component:
Set Delay
.SetDelay is an extension method of the Animation object.
This method adds a delay to the animation. It is counted in seconds.
Note
Delaying an animation will also delay the OnStart function call.
Code usage:
transform.AMAmove(Axis.x, 1f, 2f).SetDelay(4f); // aka '_delay' -> Seconds to wait for | float
Version with component:
Stop MA
.StopMA is an extension method of a Unity Object.
This method stops every animation attached to this object.
Code usage:
transform.StopMA();
Stop All
.StopAll is a method.
This method stops every animation.
Code usage:
AMAMain.StopAll();