UGUIMotionExtensions
uGUIのGraphic、Text、Image、CanvasGroupを更新します。色のチャンネル、表示する文字列、塗りつぶし量などを選べます。
public static partial class UGUIMotionExtensions使用条件 com.unity.ugui
CanvasGroupの透明度を変える
対象にCanvasGroupを付け、MonoBehaviourから実行します。using MeatMotion;、using MeatMotion.Extensions;、using UnityEngine; と、独自asmdefの場合は MeatMotion.UI の参照を追加します。
var group = gameObject.GetComponent<CanvasGroup>();
var fade = MMotion.Create(0f, 1f, 0.4f)
.BindToAlpha(group).AddTo(gameObject);
メンバー
- BindToColor
- BindToColorR
- BindToColorG
- BindToColorB
- BindToColorA
- BindToFillAmount
- BindToAlpha
- BindToFontSize
- BindToText
BindToColor
対象のColorに補間値を書き込むTweenを登録し、MotionHandleを返します。
public static MotionHandle BindToColor<TOptions, TAdapter>(this MotionBuilder<Color, TOptions, TAdapter> builder, Graphic graphic)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<Color, TOptions>引数と戻り値
builderthis MotionBuilder<Color, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。graphicGraphic値を適用する対象(Graphic)。- 戻り値
MotionHandle
BindToColorR
ColorのRチャンネルだけを更新し、残りの色成分は現在値を保ちます。
public static MotionHandle BindToColorR(this FloatMotionBuilder builder, Graphic graphic)引数と戻り値
builderthis FloatMotionBuilder設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。graphicGraphic値を適用する対象(Graphic)。- 戻り値
MotionHandle
public static MotionHandle BindToColorR<TOptions, TAdapter>(this MotionBuilder<float, TOptions, TAdapter> builder, Graphic graphic)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<float, TOptions>引数と戻り値
builderthis MotionBuilder<float, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。graphicGraphic値を適用する対象(Graphic)。- 戻り値
MotionHandle
BindToColorG
ColorのGチャンネルだけを更新し、残りの色成分は現在値を保ちます。
public static MotionHandle BindToColorG(this FloatMotionBuilder builder, Graphic graphic)引数と戻り値
builderthis FloatMotionBuilder設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。graphicGraphic値を適用する対象(Graphic)。- 戻り値
MotionHandle
public static MotionHandle BindToColorG<TOptions, TAdapter>(this MotionBuilder<float, TOptions, TAdapter> builder, Graphic graphic)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<float, TOptions>引数と戻り値
builderthis MotionBuilder<float, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。graphicGraphic値を適用する対象(Graphic)。- 戻り値
MotionHandle
BindToColorB
ColorのBチャンネルだけを更新し、残りの色成分は現在値を保ちます。
public static MotionHandle BindToColorB(this FloatMotionBuilder builder, Graphic graphic)引数と戻り値
builderthis FloatMotionBuilder設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。graphicGraphic値を適用する対象(Graphic)。- 戻り値
MotionHandle
public static MotionHandle BindToColorB<TOptions, TAdapter>(this MotionBuilder<float, TOptions, TAdapter> builder, Graphic graphic)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<float, TOptions>引数と戻り値
builderthis MotionBuilder<float, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。graphicGraphic値を適用する対象(Graphic)。- 戻り値
MotionHandle
BindToColorA
ColorのAチャンネルだけを更新し、残りの色成分は現在値を保ちます。
public static MotionHandle BindToColorA(this FloatMotionBuilder builder, Graphic graphic)引数と戻り値
builderthis FloatMotionBuilder設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。graphicGraphic値を適用する対象(Graphic)。- 戻り値
MotionHandle
public static MotionHandle BindToColorA<TOptions, TAdapter>(this MotionBuilder<float, TOptions, TAdapter> builder, Graphic graphic)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<float, TOptions>引数と戻り値
builderthis MotionBuilder<float, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。graphicGraphic値を適用する対象(Graphic)。- 戻り値
MotionHandle
BindToFillAmount
Image.fillAmountにfloatをバインドします。
public static MotionHandle BindToFillAmount(this FloatMotionBuilder builder, Image image)引数と戻り値
builderthis FloatMotionBuilder設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。imageImage値を適用する対象(Image)。- 戻り値
MotionHandle
public static MotionHandle BindToFillAmount<TOptions, TAdapter>(this MotionBuilder<float, TOptions, TAdapter> builder, Image image)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<float, TOptions>引数と戻り値
builderthis MotionBuilder<float, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。imageImage値を適用する対象(Image)。- 戻り値
MotionHandle
BindToAlpha
CanvasGroup.alphaにfloatをバインドし、グループの表示をフェードさせます。
public static MotionHandle BindToAlpha(this FloatMotionBuilder builder, CanvasGroup canvasGroup)引数と戻り値
builderthis FloatMotionBuilder設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。canvasGroupCanvasGroup値を適用する対象(CanvasGroup)。- 戻り値
MotionHandle
public static MotionHandle BindToAlpha<TOptions, TAdapter>(this MotionBuilder<float, TOptions, TAdapter> builder, CanvasGroup canvasGroup)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<float, TOptions>引数と戻り値
builderthis MotionBuilder<float, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。canvasGroupCanvasGroup値を適用する対象(CanvasGroup)。- 戻り値
MotionHandle
BindToFontSize
対象のFontSizeに補間値を書き込むTweenを登録し、MotionHandleを返します。
public static MotionHandle BindToFontSize<TOptions, TAdapter>(this MotionBuilder<int, TOptions, TAdapter> builder, Text text)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<int, TOptions>引数と戻り値
builderthis MotionBuilder<int, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。textText値を適用する対象(Text)。- 戻り値
MotionHandle
BindToText
補間した文字列や数値をテキストに反映します。数値の書式を指定する形式ではformatを渡します。
public static MotionHandle BindToText<TOptions, TAdapter>(this MotionBuilder<FixedString32Bytes, TOptions, TAdapter> builder, Text text)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<FixedString32Bytes, TOptions>引数と戻り値
builderthis MotionBuilder<FixedString32Bytes, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。textText値を適用する対象(Text)。- 戻り値
MotionHandle
public static MotionHandle BindToText<TOptions, TAdapter>(this MotionBuilder<FixedString64Bytes, TOptions, TAdapter> builder, Text text)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<FixedString64Bytes, TOptions>引数と戻り値
builderthis MotionBuilder<FixedString64Bytes, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。textText値を適用する対象(Text)。- 戻り値
MotionHandle
public static MotionHandle BindToText<TOptions, TAdapter>(this MotionBuilder<FixedString128Bytes, TOptions, TAdapter> builder, Text text)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<FixedString128Bytes, TOptions>引数と戻り値
builderthis MotionBuilder<FixedString128Bytes, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。textText値を適用する対象(Text)。- 戻り値
MotionHandle
public static MotionHandle BindToText<TOptions, TAdapter>(this MotionBuilder<FixedString512Bytes, TOptions, TAdapter> builder, Text text)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<FixedString512Bytes, TOptions>引数と戻り値
builderthis MotionBuilder<FixedString512Bytes, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。textText値を適用する対象(Text)。- 戻り値
MotionHandle
public static MotionHandle BindToText<TOptions, TAdapter>(this MotionBuilder<FixedString4096Bytes, TOptions, TAdapter> builder, Text text)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<FixedString4096Bytes, TOptions>引数と戻り値
builderthis MotionBuilder<FixedString4096Bytes, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。textText値を適用する対象(Text)。- 戻り値
MotionHandle
public static MotionHandle BindToText<TOptions, TAdapter>(this MotionBuilder<int, TOptions, TAdapter> builder, Text text)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<int, TOptions>引数と戻り値
builderthis MotionBuilder<int, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。textText値を適用する対象(Text)。- 戻り値
MotionHandle
public static MotionHandle BindToText<TOptions, TAdapter>(this MotionBuilder<int, TOptions, TAdapter> builder, Text text, string format)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<int, TOptions>引数と戻り値
builderthis MotionBuilder<int, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。textText値を適用する対象(Text)。formatstring補間した値を文字列に変換する書式。- 戻り値
MotionHandle
public static MotionHandle BindToText<TOptions, TAdapter>(this MotionBuilder<long, TOptions, TAdapter> builder, Text text)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<long, TOptions>引数と戻り値
builderthis MotionBuilder<long, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。textText値を適用する対象(Text)。- 戻り値
MotionHandle
public static MotionHandle BindToText<TOptions, TAdapter>(this MotionBuilder<long, TOptions, TAdapter> builder, Text text, string format)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<long, TOptions>引数と戻り値
builderthis MotionBuilder<long, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。textText値を適用する対象(Text)。formatstring補間した値を文字列に変換する書式。- 戻り値
MotionHandle
public static MotionHandle BindToText(this FloatMotionBuilder builder, Text text)引数と戻り値
builderthis FloatMotionBuilder設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。textText値を適用する対象(Text)。- 戻り値
MotionHandle
public static MotionHandle BindToText<TOptions, TAdapter>(this MotionBuilder<float, TOptions, TAdapter> builder, Text text)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<float, TOptions>引数と戻り値
builderthis MotionBuilder<float, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。textText値を適用する対象(Text)。- 戻り値
MotionHandle
public static MotionHandle BindToText(this FloatMotionBuilder builder, Text text, string format)引数と戻り値
builderthis FloatMotionBuilder設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。textText値を適用する対象(Text)。formatstring補間した値を文字列に変換する書式。- 戻り値
MotionHandle
public static MotionHandle BindToText<TOptions, TAdapter>(this MotionBuilder<float, TOptions, TAdapter> builder, Text text, string format)
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<float, TOptions>引数と戻り値
builderthis MotionBuilder<float, TOptions, TAdapter>設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。textText値を適用する対象(Text)。formatstring補間した値を文字列に変換する書式。- 戻り値
MotionHandle
MeatMotion