# FloatMotionBuilder

Configure a float tween created by MMotion.Create. A stateful Bind passes the target to the setter without a captured lambda.

Namespace: MeatMotion

Assembly: MeatMotion

```csharp
public struct FloatMotionBuilder
```

[Runtime/Builders/FloatMotionBuilder.cs · L11](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L11)

## WithScheduler

Choose the automatic update phase or manual world before binding.

```csharp
public FloatMotionBuilder WithScheduler(MotionWorld world)
```

Parameters and return value

- `world` (`MotionWorld`) MotionWorld in which to schedule the tween.
- Returns: `FloatMotionBuilder`

[Runtime/Builders/FloatMotionBuilder.cs · L45](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L45)

```csharp
public FloatMotionBuilder WithScheduler(IMotionScheduler scheduler)
```

Parameters and return value

- `scheduler` (`IMotionScheduler`) Scheduler that determines where the motion is registered and updated.
- Returns: `FloatMotionBuilder`

[Runtime/Builders/FloatMotionBuilder.cs · L50](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L50)

## ToMotionSettings

Capture the configuration before binding and pass it to MMotion.Create to reuse it.

```csharp
public MotionSettings<float, NoOptions> ToMotionSettings()
```

Return value

- Returns: `MotionSettings<float, NoOptions>`

[Runtime/Builders/FloatMotionBuilder.cs · L53](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L53)

## AsMotionBuilder

Copy the current configuration into a single-use generic float builder.

```csharp
public MotionBuilder<float, NoOptions, FloatMotionAdapter> AsMotionBuilder()
```

Return value

- Returns: `MotionBuilder<float, NoOptions, FloatMotionAdapter>`

[Runtime/Builders/FloatMotionBuilder.cs · L56](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L56)

## WithEase

Choose the curve that maps normalized time to progress. When used with Bind, an AnimationCurve is sampled from a snapshot taken at bind time.

```csharp
public FloatMotionBuilder WithEase(Easing easing)
```

Parameters and return value

- `easing` (`Easing`) Easing function mapping normalized time to progress.
- Returns: `FloatMotionBuilder`

[Runtime/Builders/FloatMotionBuilder.cs · L66](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L66)

```csharp
public FloatMotionBuilder WithEase(Ease ease)
```

Parameters and return value

- `ease` (`Ease`) Easing function mapping normalized time to progress.
- Returns: `FloatMotionBuilder`

[Runtime/Builders/FloatMotionBuilder.cs · L73](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L73)

```csharp
public FloatMotionBuilder WithEase(AnimationCurve animationCurve)
```

Parameters and return value

- `animationCurve` (`AnimationCurve`) Unity AnimationCurve with its keys and pre/post wrap modes.
- Returns: `FloatMotionBuilder`

[Runtime/Builders/FloatMotionBuilder.cs · L79](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L79)

## WithImmediateBind

Pass false to suppress the initial write at bind time, for example on a later sequence child targeting the same property.

```csharp
public FloatMotionBuilder WithImmediateBind(bool enabled = true)
```

Parameters and return value

- `enabled = true` (`bool`) Whether to enable this setting.
- Returns: `FloatMotionBuilder`

[Runtime/Builders/FloatMotionBuilder.cs · L86](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L86)

## WithCancelOnError

Choose whether an exception from the bound setter cancels this tween.

```csharp
public FloatMotionBuilder WithCancelOnError(bool enabled = true)
```

Parameters and return value

- `enabled = true` (`bool`) Whether to enable this setting.
- Returns: `FloatMotionBuilder`

[Runtime/Builders/FloatMotionBuilder.cs · L87](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L87)

## WithDelay

Set a delay in seconds and choose which loops receive it. skipValuesDuringDelay controls writes while waiting.

```csharp
public FloatMotionBuilder WithDelay(float delay, DelayType delayType = DelayType.FirstLoop, bool skipValuesDuringDelay = true)
```

Parameters and return value

- `delay` (`float`) Delay before interpolation, in seconds.
- `delayType = DelayType.FirstLoop` (`DelayType`) Apply the delay once or before every loop.
- `skipValuesDuringDelay = true` (`bool`) Whether to skip setter writes during a delay.
- Returns: `FloatMotionBuilder`

[Runtime/Builders/FloatMotionBuilder.cs · L88](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L88)

## WithLoops

Set the loop count and LoopType. Stop an infinite loop by canceling it.

```csharp
public FloatMotionBuilder WithLoops(int loops, LoopType loopType = LoopType.Restart)
```

Parameters and return value

- `loops` (`int`) Loop count. Use -1 for an infinite loop.
- `loopType = LoopType.Restart` (`LoopType`) How progress is evaluated on successive passes.
- Returns: `FloatMotionBuilder`

[Runtime/Builders/FloatMotionBuilder.cs · L96](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L96)

## WithOnLoopComplete

Register a callback that receives the completed loop count at a loop boundary.

```csharp
public FloatMotionBuilder WithOnLoopComplete(Action<int> callback)
```

Parameters and return value

- `callback` (`Action<int>`) Register a callback that receives the completed loop count at a loop boundary.
- Returns: `FloatMotionBuilder`

[Runtime/Builders/FloatMotionBuilder.cs · L102](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L102)

## WithOnComplete

Register work to run on completion, including explicit completion.

```csharp
public FloatMotionBuilder WithOnComplete(Action action)
```

Parameters and return value

- `action` (`Action`) Register work to run on completion, including explicit completion.
- Returns: `FloatMotionBuilder`

[Runtime/Builders/FloatMotionBuilder.cs · L103](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L103)

## WithDebugName

Set a name for identifying the tween in the Editor or a Development Build.

```csharp
public FloatMotionBuilder WithDebugName(string debugName)
```

Parameters and return value

- `debugName` (`string`) Name used to identify the tween while debugging.
- Returns: `FloatMotionBuilder`

[Runtime/Builders/FloatMotionBuilder.cs · L104](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L104)

## WithOnCancel

Register work to run when the motion is canceled.

```csharp
public FloatMotionBuilder WithOnCancel(Action action)
```

Parameters and return value

- `action` (`Action`) Register work to run when the motion is canceled.
- Returns: `FloatMotionBuilder`

[Runtime/Builders/FloatMotionBuilder.cs · L105](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L105)

## RunWithoutBinding

Schedule without a value setter and return a handle for timing and callbacks.

```csharp
public MotionHandle RunWithoutBinding()
```

Return value

- Returns: `MotionHandle`

[Runtime/Builders/FloatMotionBuilder.cs · L107](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L107)

## Bind

Schedule the tween with a value setter. Stateful overloads pass the bound state after the interpolated value.

```csharp
public MotionHandle Bind(Action<float> setter)
```

Parameters and return value

- `setter` (`Action<float>`) Callback receiving the sampled value.
- Returns: `MotionHandle`

[Runtime/Builders/FloatMotionBuilder.cs · L117](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L117)

```csharp
public MotionHandle Bind<T>(T state, Action<float, T> setter)
    where T : class
```

Parameters and return value

- `state` (`T`) State passed to the setter after the interpolated value.
- `setter` (`Action<float, T>`) Callback receiving the sampled value.
- Returns: `MotionHandle`

[Runtime/Builders/FloatMotionBuilder.cs · L126](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L126)

```csharp
public MotionHandle Bind<T1, T2>(T1 state0, T2 state1, Action<float, T1, T2> setter)
    where T1 : class
    where T2 : class
```

Parameters and return value

- `state0` (`T1`) State passed to the setter after the interpolated value.
- `state1` (`T2`) State passed to the setter after the interpolated value.
- `setter` (`Action<float, T1, T2>`) Callback receiving the sampled value.
- Returns: `MotionHandle`

[Runtime/Builders/FloatMotionBuilder.cs · L135](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L135)

```csharp
public MotionHandle Bind<T1, T2, T3>(T1 state0, T2 state1, T3 state2, Action<float, T1, T2, T3> setter)
    where T1 : class
    where T2 : class
    where T3 : class
```

Parameters and return value

- `state0` (`T1`) State passed to the setter after the interpolated value.
- `state1` (`T2`) State passed to the setter after the interpolated value.
- `state2` (`T3`) State passed to the setter after the interpolated value.
- `setter` (`Action<float, T1, T2, T3>`) Callback receiving the sampled value.
- Returns: `MotionHandle`

[Runtime/Builders/FloatMotionBuilder.cs · L139](../../../source/Runtime/Builders/FloatMotionBuilder.cs.html#L139)

## Related types

- [AudioMotionExtensions](../../../en/api/extensions-audiomotionextensions/index.md)

- [CameraMotionExtensions](../../../en/api/extensions-cameramotionextensions/index.md)

- [LoggerMotionExtensions](../../../en/api/extensions-loggermotionextensions/index.md)

- [MaterialMotionExtensions](../../../en/api/extensions-materialmotionextensions/index.md)

- [ProgressMotionExtensions](../../../en/api/extensions-progressmotionextensions/index.md)

- [RectTransformMotionExtensions](../../../en/api/extensions-recttransformmotionextensions/index.md)

- [Rigidbody2DMotionExtensions](../../../en/api/extensions-rigidbody2dmotionextensions/index.md)

- [RigidbodyMotionExtensions](../../../en/api/extensions-rigidbodymotionextensions/index.md)

- [SpriteRendererMotionExtensions](../../../en/api/extensions-spriterenderermotionextensions/index.md)

- [TextMeshProMotionExtensions](../../../en/api/extensions-textmeshpromotionextensions/index.md)

- [TransformMotionExtensions](../../../en/api/extensions-transformmotionextensions/index.md)

- [UGUIMotionExtensions](../../../en/api/extensions-uguimotionextensions/index.md)

- [UIToolkitMotionExtensions](../../../en/api/extensions-uitoolkitmotionextensions/index.md)

- [VisualEffectMotionExtensions](../../../en/api/extensions-visualeffectmotionextensions/index.md)

- [VolumeMotionExtensions](../../../en/api/extensions-volumemotionextensions/index.md)

- [MotionBuilderExtensions](../../../en/api/motionbuilderextensions/index.md)

- [R3MotionExtensions](../../../en/api/r3motionextensions/index.md)

- [UniRxMotionExtensions](../../../en/api/unirxmotionextensions/index.md)

- [UniTaskMotionExtensions](../../../en/api/unitaskmotionextensions/index.md)
