CurveTween ドキュメント

機能一覧 (Features)

Fade(フェード)

オブジェクトの透明度(Alpha)をアニメーションします。

• 対象
• 使用例

Move(移動)

Transform の位置をアニメーションします。

• 使用例

Scale(拡大縮小)

Transform のスケールをアニメーションします。

• 使用例

Rotate(回転)

Transform の回転をアニメーションします。

• 使用例

Color(カラー)

色(Color)をアニメーションします。

• 対象
• 使用例

Text(UI Text/TextMeshPro)

テキストのタイピング風アニメーションします。

• 使用例

RichText (TextMeshPro)

リッチテキストに対応し、タイピング風アニメーション、回転アニメーション、フォントサイズの拡大縮小アニメーションをサポートします。(ただし GC 負荷が高い 点に注意が必要です)

• 使用例
• 使用例

Light

Unity Light コンポーネントの各種プロパティをアニメーションします。

• 対象
• 使用例

FillAmount

Image コンポーネントの fillAmount をアニメーションさせる機能です。 ゲージ • クールダウン • 円形ロードなど、UI 表現に利用できます。

• 対象
• 使用例

IntInterpolate / FloatInterpolate

Text / TextMeshPro の数値を補間しながらアニメーション表示する機能です。 カウントアップ、ダメージ数値、スコア演出などに最適です。

• 対象
• 使用例

TMPMeshExplodeInAnimation

TextMeshPro の頂点データを直接操作し、文字を個別に爆発させるアニメーションです。 速度 • 方向 • 拡散度 • ランダム性などを細かく制御でき、派手な演出に向いています。

• 対象
• 使用例
• 使用例

TMPMeshRevealAnimation

TextMeshPro の頂点を直接操作し、以下の複合的な文字演出を実現するアニメーションです。 Fade(透明度)、Character Scale(文字スケール)、Rotate(回転)、Move(移動)、Wave(波形変形)、Bounce(バウンス変形)、 タイプライター風の演出から、動きのある複雑な文字アニメーションまで幅広く対応します。

• 対象
• 使用例
• 使用例

PathCurveAnimation

PathCurveAnimation は、複数のポイントで構成されたカーブ(パス)に沿って対象オブジェクトを移動させるアニメーション機能です。

• 使用例

APIリファレンス

DoCanvasFade

CanvasGroupの alpha をアニメーションさせるためのユーティリティメソッドです。

ITweenPlayer DoCanvasFade(this GameObject target, float forwardValue = 0, bool blocksraycasts = false, float duration = 1);

ITweenPlayer DoCanvasFade(this GameObject target, AnimationCurve curve, float forwardValue = 0, bool blocksraycasts = false);

ITweenPlayer DoCanvasFade(this MonoBehaviour target, float forwardValue = 0, bool blocksraycasts = false, float duration = 1);

ITweenPlayer DoCanvasFade(this MonoBehaviour target, AnimationCurve curve, float forwardValue = 0, bool blocksraycasts = false);

ITweenPlayer DoCanvasFade(this CanvasGroup target, float forwardValue = 0, bool blocksraycasts = false, float duration = 1);

ITweenPlayer DoCanvasFade(this CanvasGroup target, AnimationCurve curve, float forwardValue = 0, bool blocksraycasts = false);

• パラメータ

DoFade

対象オブジェクトの alpha をアニメーションさせるためのユーティリティメソッドです。

ITweenPlayer DoFade(this Material target, float forwardValue = 0, float duration = 1);

ITweenPlayer DoFade(this Renderer target, float forwardValue = 0, float duration = 1);

ITweenPlayer DoFade(this Graphic target, float forwardValue = 0, float duration = 1);

ITweenPlayer DoFade(this Renderer target, AnimationCurve curve, float forwardValue = 0);

ITweenPlayer DoFade(this Graphic target, AnimationCurve curve, float forwardValue = 0);

ITweenPlayer DoFade(this Material target, AnimationCurve curve, float forwardValue = 0);

• パラメータ

DoColor

対象オブジェクトの Color をアニメーションさせるためのユーティリティメソッドです。

ITweenPlayer DoColor(this Graphic target, Color forwardValue, float duration = 1);

ITweenPlayer DoColor(this Graphic target, Color forwardValue, AnimationCurve curve);

ITweenPlayer DoColor(this Renderer target, Color forwardValue, float duration = 1);

ITweenPlayer DoColor(this Renderer target, Color forwardValue, AnimationCurve curve);

ITweenPlayer DoColor(this Material target, Color forwardValue, float duration = 1);

ITweenPlayer DoColor(this Material target, Color forwardValue, AnimationCurve curve);

• パラメータ

DoFillAmount

DoFillAmount は、UnityEngine.UI.Image の fillAmount をスムーズにアニメーションさせるための拡張メソッドです。

ITweenPlayer DoFillAmount(this Image target, float forwardValue = 0, float duration = 1);

ITweenPlayer DoFillAmount(this Image target, AnimationCurve curve, float forwardValue = 0);

• パラメータ

DoLight / DoIntensity / DoRange

Light コンポーネントの color、intensity、range をアニメーションさせるためのユーティリティメソッドです。

ITweenPlayer DoColor(this Light target, Color color, float duration = 1);

ITweenPlayer DoColor(this Light target, Color color, AnimationCurve curve);

ITweenPlayer DoIntensity(this Light target, float intensity, float duration = 1);

ITweenPlayer DoIntensity(this Light target, float intensity, AnimationCurve curve);

ITweenPlayer DoRange(this Light target, float range, float duration = 1);

ITweenPlayer DoRange(this Light target, float range, AnimationCurve curve);

ITweenPlayer DoLight(this Light target, bool colortween = false, Color color = default, bool intensitytween = false, float intensity = 0, bool rangetween = false, float range = 0, float duration = 1);

ITweenPlayer DoLight(this Light target, AnimationCurve curve, bool colortween = false, Color color = default, bool intensitytween = false, float intensity = 0, bool rangetween = false, float range = 0);

• パラメータ

DoInterpolate

Text / TextMeshPro の数値を補間しながらアニメーション表示させるためのユーティリティメソッドです。

ITweenPlayer DoInterpolate(this Text target, int forwardValue, float duration = 1);

ITweenPlayer DoInterpolate(this Text target, int forwardValue, AnimationCurve curve);

ITweenPlayer DoInterpolate(this Text target, float forwardValue, float duration = 1);

ITweenPlayer DoInterpolate(this Text target, float forwardValue, AnimationCurve curve);

ITweenPlayer DoInterpolate(this TMP_Text target, float forwardValue, float duration = 1);

ITweenPlayer DoInterpolate(this TMP_Text target, float forwardValue, AnimationCurve curve);

ITweenPlayer DoInterpolate(this TMP_Text target, int forwardValue, float duration = 1);

ITweenPlayer DoInterpolate(this TMP_Text target, int forwardValue, AnimationCurve curve);

• パラメータ

DoMove / DoMove(X/Y/Z)

対象オブジェクトの 移動 をアニメーションさせるためのユーティリティメソッドです。

ITweenPlayer DoMoveX(this GameObject target, float x, float duration = 1);

ITweenPlayer DoMoveX(this GameObject target, float x, AnimationCurve curve);

ITweenPlayer DoMoveY(this GameObject target, float y, float duration = 1);

ITweenPlayer DoMoveY(this GameObject target, float y, AnimationCurve curve);

ITweenPlayer DoMoveZ(this GameObject target, float z, float duration = 1);

ITweenPlayer DoMoveZ(this GameObject target, float z, AnimationCurve curve);

ITweenPlayer DoMove(this GameObject target, Vector3 forwardValue, float duration = 1, bool relative = false);

ITweenPlayer DoMove(this GameObject target, Vector3 forwardValue, AnimationCurve curve, bool relative = false);

ITweenPlayer DoMoveX<T>(this T target, float x, float duration = 1) where T : Component;

ITweenPlayer DoMoveX<T>(this T target, float x, AnimationCurve curve) where T : Component;

ITweenPlayer DoMoveY<T>(this T target, float y, float duration = 1) where T : Component;

ITweenPlayer DoMoveY<T>(this T target, float y, AnimationCurve curve) where T : Component;

ITweenPlayer DoMoveZ<T>(this T target, float z, float duration = 1) where T : Component;

ITweenPlayer DoMoveZ<T>(this T target, float z, AnimationCurve curve) where T : Component;

ITweenPlayer DoMove<T>(this T target, Vector3 forwardValue, float duration = 1, bool relative = false) where T : Component;

ITweenPlayer DoMove<T>(this T target, Vector3 forwardValue, AnimationCurve curve, bool relative = false) where T : Component;

• パラメータ

DoRotation / DoRotation(X/Y/Z)

対象オブジェクトの 回転 をアニメーションさせるためのユーティリティメソッドです。

ITweenPlayer DoRotationX(this GameObject target, float x, float duration = 1);

ITweenPlayer DoRotationX(this GameObject target, float x, AnimationCurve curve);

ITweenPlayer DoRotationY(this GameObject target, float y, float duration = 1);

ITweenPlayer DoRotationY(this GameObject target, float y, AnimationCurve curve);

ITweenPlayer DoRotationZ(this GameObject target, float z, float duration = 1);

ITweenPlayer DoRotationZ(this GameObject target, float z, AnimationCurve curve);

ITweenPlayer DoRotation(this GameObject target, Vector3 forwardValue, float duration = 1, bool relative = false);

ITweenPlayer DoRotation(this GameObject target, Vector3 forwardValue, AnimationCurve curve, bool relative = false);

ITweenPlayer DoRotationX<T>(this T target, float x, float duration = 1) where T : Component;

ITweenPlayer DoRotationX<T>(this T target, float x, AnimationCurve curve) where T : Component;

ITweenPlayer DoRotationY<T>(this T target, float y, float duration = 1) where T : Component;

ITweenPlayer DoRotationY<T>(this T target, float y, AnimationCurve curve) where T : Component;

ITweenPlayer DoRotationZ<T>(this T target, float z, float duration = 1) where T : Component;

ITweenPlayer DoRotationZ<T>(this T target, float z, AnimationCurve curve) where T : Component;

ITweenPlayer DoRotation<T>(this T target, Vector3 forwardValue, float duration = 1, bool relative = false) where T : Component;

ITweenPlayer DoRotation<T>(this T target, Vector3 forwardValue, AnimationCurve curve, bool relative = false) where T : Component;

• パラメータ

DoScale / DoScale(X/Y/Z)

対象オブジェクトの 拡大縮小 をアニメーションさせるためのユーティリティメソッドです。

ITweenPlayer DoScaleX(this GameObject target, float x, float duration = 1);

ITweenPlayer DoScaleX(this GameObject target, float x, AnimationCurve curve);

ITweenPlayer DoScaleY(this GameObject target, float y, float duration = 1);

ITweenPlayer DoScaleY(this GameObject target, float y, AnimationCurve curve);

ITweenPlayer DoScaleZ(this GameObject target, float z, float duration = 1);

ITweenPlayer DoScaleZ(this GameObject target, float z, AnimationCurve curve);

ITweenPlayer DoScale(this GameObject target, Vector3 forwardValue, float duration = 1, bool relative = false);

ITweenPlayer DoScale(this GameObject target, Vector3 forwardValue, AnimationCurve curve, bool relative = false);

ITweenPlayer DoScaleX<T>(this T target, float x, float duration = 1) where T : Component;

ITweenPlayer DoScaleX<T>(this T target, float x, AnimationCurve curve) where T : Component;

ITweenPlayer DoScaleY<T>(this T target, float y, float duration = 1) where T : Component;

ITweenPlayer DoScaleY<T>(this T target, float y, AnimationCurve curve) where T : Component;

ITweenPlayer DoScaleZ<T>(this T target, float z, float duration = 1) where T : Component;

ITweenPlayer DoScaleZ<T>(this T target, float z, AnimationCurve curve) where T : Component;

ITweenPlayer DoScale<T>(this T target, Vector3 forwardValue, float duration = 1, bool relative = false) where T : Component;

ITweenPlayer DoScale<T>(this T target, Vector3 forwardValue, AnimationCurve curve, bool relative = false) where T : Component;

• パラメータ

DoReveal

テキストを 1 文字ずつ表示するタイプライター風アニメーションを実行するユーティリティメソッド

ITweenPlayer DoReveal(this Text target, string text = null, float duration = 1);

ITweenPlayer DoReveal(this Text target, AnimationCurve curve, string text = null);

ITweenPlayer DoReveal(this TMP_Text target, string text = null, float duration = 1);

ITweenPlayer DoReveal(this TMP_Text target, AnimationCurve curve, string text = null);

• パラメータ

DoRichTextReveal

リッチテキストに対応したタイプライター風アニメーションを実行するユーティリティメソッド

IRichTextPlayer DoRichTextReveal(this TMP_Text target, string text = null, float duration = 1);

IRichTextPlayer DoRichTextReveal(this TMP_Text target, AnimationCurve curve, string text = null);

• パラメータ

DoRichTextRotateTween

リッチテキストに対応し、TextMeshPro の文字に対して回転アニメーションを実行します。

IRichTextPlayer DoRichTextRotateTween(this TMP_Text target, float rotate, string text = null, float duration = 1);

IRichTextPlayer DoRichTextRotateTween(this TMP_Text target, AnimationCurve curve, float rotate, string text = null);

• パラメータ

DoRichTextSizeTween

TextMeshPro のフォントサイズをアニメーションで変化させる機能です。

IRichTextPlayer DoRichTextSizeTween(this TMP_Text target, float fontsize, string text = null, float duration = 1);

IRichTextPlayer DoRichTextSizeTween(this TMP_Text target, AnimationCurve curve, float fontsize, string text = null);

• パラメータ

DoRichTextTween

リッチテキストに対応し、タイプライター風アニメーション •回転 •フォントサイズ変化を同時に実行できる複合テキストアニメーション機能です。

IRichTextPlayer DoRichTextTween(this TMP_Text target, bool reveal = true, string text = null, bool sizetween = false, float fontsize = 0, bool rotatetween = false, float rotate = 0, float duration = 1);

IRichTextPlayer DoRichTextTween(this TMP_Text target, AnimationCurve curve, bool reveal = true, string text = null, bool sizetween = false, float fontsize = 0, bool rotatetween = false, float rotate = 0);

• パラメータ

DoMeshExplodeIn

TextMeshPro の頂点データを直接操作し、各文字を個別に「爆発するように」外側へ飛ばすアニメーションを生成するユーティリティメソッドです。

IExplodeInPlayer DoMeshExplodeIn(this TMP_Text target, string text = null, float explosionPower = 200, bool fadeOut = true, float fadedelay = 0, bool rotate = true, float rotateMin = 50, float rotateMax = 500, bool useFloatiness = true, float factorMin = 0.02F, float factorMax = 0.15F, float duration = 1);

IExplodeInPlayer DoMeshExplodeIn(this TMP_Text target, AnimationCurve curve, string text = null, float explosionPower = 200, bool fadeOut = true, float fadedelay = 0, bool rotate = true, float rotateMin = 50, float rotateMax = 500, bool useFloatiness = true, float factorMin = 0.02F, float factorMax = 0.15F);

• パラメータ

DoMeshExplodeInFadeOut

TextMeshPro の頂点データを直接操作し、各文字を独立したメッシュとして爆発させながらフェードアウトさせるアニメーションを実現するユーティリティメソッドです。

IExplodeInPlayer DoMeshExplodeInFadeOut(this TMP_Text target, string text = null, float explosionPower = 200, float delay = 0, float duration = 1);

IExplodeInPlayer DoMeshExplodeInFadeOut(this TMP_Text target, AnimationCurve curve, string text = null, float explosionPower = 200, float delay = 0);

• パラメータ

DoMeshExplodeInFloatinessFadeOut

TextMeshPro の頂点データを直接操作し、文字をふわりと浮遊させながら四方へ飛散させ、同時にフェードアウトさせるアニメーションを実現するユーティリティメソッドです。

IExplodeInPlayer DoMeshExplodeInFloatinessFadeOut(this TMP_Text target, string text = null, float explosionPower = 200, float fadedelay = 0, float factorMin = 0.02F, float factorMax = 0.15F, float duration = 1);

IExplodeInPlayer DoMeshExplodeInFloatinessFadeOut(this TMP_Text target, AnimationCurve curve, string text = null, float explosionPower = 200, float fadedelay = 0, float factorMin = 0.02F, float factorMax = 0.15F);

• パラメータ

DoMeshExplodeInRotateFadeOut

TextMeshPro の頂点データを直接操作し、文字を個別に回転させながら爆発的に飛散させ、フェードアウトさせるアニメーションを実現するユーティリティメソッドです。

IExplodeInPlayer DoMeshExplodeInRotateFadeOut(this TMP_Text target, string text = null, float explosionPower = 200, float fadedelay = 0, float rotateMin = 50, float rotateMax = 500, float duration = 1);

IExplodeInPlayer DoMeshExplodeInRotateFadeOut(this TMP_Text target, AnimationCurve curve, string text = null, float explosionPower = 200, float fadedelay = 0, float rotateMin = 50, float rotateMax = 500);

• パラメータ

DoMeshReveal

TextMeshPro の頂点を直接操作し、Fade / Scale / Move / Rotate / Wave / Bounce など複合的な文字演出を実現するアニメーションユーティリティメソッドです。

IRevealPlayer DoMeshReveal(this TMP_Text target, bool reveal = true, string text = null, bool fadetween = false, float alpha = 1, bool postween = false, Vector3 distance = default, bool scaletween = false, float scale = 1, bool rotatetween = false, Vector3 rotate = default, WaveType wavetype = WaveType.None, float frequency = 0, float duration = 1);

IRevealPlayer DoMeshReveal(this TMP_Text target, AnimationCurve curve, bool reveal = true, string text = null, bool fadetween = false, float alpha = 1, bool postween = false, Vector3 distance = default, bool scaletween = false, float scale = 1, bool rotatetween = false, Vector3 rotate = default, WaveType wavetype = WaveType.None, float frequency = 0);

• パラメータ

DoMeshFadeReveal

TextMeshPro の頂点を直接操作し、Fade + Reveal を中心とした複合的な文字演出を行うユーティリティメソッド。

IRevealPlayer DoMeshFadeReveal(this TMP_Text target, float alpha = 0, bool reveal = true, string text = null, float duration = 1);

IRevealPlayer DoMeshFadeReveal(this TMP_Text target, AnimationCurve curve, float alpha = 0, bool reveal = true, string text = null);

• パラメータ

DoMeshMoveReveal / DoMeshMove(X/Y/Z)Reveal

TextMeshPro の頂点を直接操作し、Move(移動)+ Reveal を中心に Wave / Bounce などの動きを組み合わせたアニメーションを実現するユーティリティメソッド。

IRevealPlayer DoMeshMoveReveal(this TMP_Text target, Vector3 distance, WaveType wavetype = WaveType.None, float frequency = 0, bool reveal = true, string text = null, float duration = 1);

IRevealPlayer DoMeshMoveReveal(this TMP_Text target, Vector3 distance, AnimationCurve curve, WaveType wavetype = WaveType.None, float frequency = 0, bool reveal = true, string text = null);

IRevealPlayer DoMeshMoveXReveal(this TMP_Text target, float x, WaveType wavetype = WaveType.None, float frequency = 0, bool reveal = true, string text = null, float duration = 1);

IRevealPlayer DoMeshMoveXReveal(this TMP_Text target, float x, AnimationCurve curve, WaveType wavetype = WaveType.None, float frequency = 0, bool reveal = true, string text = null);

IRevealPlayer DoMeshMoveYReveal(this TMP_Text target, float y, WaveType wavetype = WaveType.None, float frequency = 0, bool reveal = true, string text = null, float duration = 1);

IRevealPlayer DoMeshMoveYReveal(this TMP_Text target, float y, AnimationCurve curve, WaveType wavetype = WaveType.None, float frequency = 0, bool reveal = true, string text = null);

IRevealPlayer DoMeshMoveZReveal(this TMP_Text target, float z, WaveType wavetype = WaveType.None, float frequency = 0, bool reveal = true, string text = null, float duration = 1);

IRevealPlayer DoMeshMoveZReveal(this TMP_Text target, float z, AnimationCurve curve, WaveType wavetype = WaveType.None, float frequency = 0, bool reveal = true, string text = null);

• パラメータ

DoMeshRotateReveal / DoMeshRotate(X/Y/Z)Reveal

TextMeshPro の頂点を直接操作し、Rotate(回転)+ Reveal を中心としたアニメーションを実現するユーティリティメソッド。

IRevealPlayer DoMeshRotateReveal(this TMP_Text target, Vector3 rotate, bool reveal = true, string text = null, float duration = 1);

IRevealPlayer DoMeshRotateReveal(this TMP_Text target, Vector3 rotate, AnimationCurve curve, bool reveal = true, string text = null);

IRevealPlayer DoMeshRotateXReveal(this TMP_Text target, float x, bool reveal = true, string text = null, float duration = 1);

IRevealPlayer DoMeshRotateXReveal(this TMP_Text target, float x, AnimationCurve curve, bool reveal = true, string text = null);

IRevealPlayer DoMeshRotateYReveal(this TMP_Text target, float y, AnimationCurve curve, bool reveal = true, string text = null);

IRevealPlayer DoMeshRotateYReveal(this TMP_Text target, float y, bool reveal = true, string text = null, float duration = 1);

IRevealPlayer DoMeshRotateZReveal(this TMP_Text target, float z, bool reveal = true, string text = null, float duration = 1);

IRevealPlayer DoMeshRotateZReveal(this TMP_Text target, float z, AnimationCurve curve, bool reveal = true, string text = null);

• パラメータ

DoMeshScaleReveal

TextMeshPro の頂点を直接操作し、Scale(拡大縮小)+ Reveal を中心としたアニメーションを実現するユーティリティメソッド。

IRevealPlayer DoMeshScaleReveal(this TMP_Text target, AnimationCurve curve, float scale = 0, bool reveal = true, string text = null);

IRevealPlayer DoMeshScaleReveal(this TMP_Text target, float scale = 0, bool reveal = true, string text = null, float duration = 1);

• パラメータ

Path Settings

複数のポイントで構成されたカーブ(パス)に沿って対象オブジェクトを移動させるアニメーション機能です。

IPathPlayer SetClosed(bool closed);

• パラメータ

IPathPlayer SetLookMode(PathLookMode lookmode);

• パラメータ

IPathPlayer SetPoints(List vectors);

IPathPlayer SetTarget(Transform target);

IPathPlayer SetUseLocalPosition(bool uselocal);

• パラメータ

IPathPlayer SnapTargetToFirstPoint();

CurveTween Settings

CurveTween の挙動を制御するための設定項目です。

iTweenPlayer SetDelay(float delay);

iTweenPlayer SetDuration(float duration);

iTweenPlayer SetEase(EaseType easeType);

iTweenPlayer SetLoop(bool loop);

• パラメータ

iTweenPlayer SetLoopCount(int loopCount);

iTweenPlayer SetLoopDelay(bool loopDelay);

• パラメータ

iTweenPlayer SetLoopType(LoopType loopType);

• パラメータ

iTweenPlayer SetScaledTime(bool scaledtime);

• パラメータ

iTweenPlayer SetYoYoDelay(float yoYoDelay);

iTweenPlayer SetValue(object value);

Play / Stop

アニメーションの開始 • 停止を制御します。

void Play();

void Play(bool reversePlay);

• パラメータ

void PlayOnce();

void PlayReverseOnce();

void Stop();

void ForceEnd(bool invokeCallback);

• パラメータ

void StopAndReset();

Event Callbacks

アニメーションの開始 • 進行 • 完了時に呼ばれるイベントを登録します。

iTweenPlayer AddOnStartListener(UnityAction call);

iTweenPlayer AddOnYoYoListener(UnityAction call);

iTweenPlayer AddOnCompleteListener(UnityAction call);

GetAnimationCurve

指定した EaseType に基づいて、アニメーションカーブ(Keyframe 配列)を生成して返します。EaseType の補間特性(Linear、EaseInSine、EaseOutSine、EaseInOutSine など)に応じた0〜1 の正規化カーブを構築し、Tween の補間処理に利用できます。

Keyframe[] CurveTweenUtility.GetAnimationCurve(EaseType easeType);