# MotionSettings<TValue, TOptions>

Store endpoints, timing, easing, loops and binding options in a record for reuse across multiple tweens.

Namespace: MeatMotion

Assembly: MeatMotion

```csharp
public record MotionSettings<TValue, TOptions>
    where TValue : unmanaged
    where TOptions : unmanaged, IMotionOptions
```

[Runtime/MotionSettings.cs · L12](../../../source/Runtime/MotionSettings.cs.html#L12)

## Create a tween from a settings record

Add `using MeatMotion;`. Ticking the tween for half a second writes 4, halfway between 2 and 6.

```csharp
using var world = new MotionWorld();
var settings = new MotionSettings<float, NoOptions>
{
    StartValue = 2f, EndValue = 6f, Duration = 1f, Scheduler = world
};
float value = 0f;
MMotion.Create(settings).Bind(v => value = v);
world.Tick(0.5);
```

## StartValue

Starting value in the saved configuration.

```csharp
public TValue StartValue { get; init; }
```

[Runtime/MotionSettings.cs · L31](../../../source/Runtime/MotionSettings.cs.html#L31)

## EndValue

End value in the saved configuration.

```csharp
public TValue EndValue { get; init; }
```

[Runtime/MotionSettings.cs · L32](../../../source/Runtime/MotionSettings.cs.html#L32)

## Duration

Duration of an interpolation interval, in seconds.

```csharp
public float Duration { get; init; }
```

[Runtime/MotionSettings.cs · L33](../../../source/Runtime/MotionSettings.cs.html#L33)

## Options

Adapter-specific options supplied to Evaluate.

```csharp
public TOptions Options { get; init; }
```

[Runtime/MotionSettings.cs · L34](../../../source/Runtime/MotionSettings.cs.html#L34)

## Ease

Ease applied to normalized time.

```csharp
public Ease Ease { get; init; }
```

[Runtime/MotionSettings.cs · L35](../../../source/Runtime/MotionSettings.cs.html#L35)

## CustomEaseCurve

Unity curve used when CustomAnimationCurve is selected.

```csharp
public AnimationCurve CustomEaseCurve { get; init; }
```

[Runtime/MotionSettings.cs · L36](../../../source/Runtime/MotionSettings.cs.html#L36)

## Delay

Delay in seconds before the first pass or each loop.

```csharp
public float Delay { get; init; }
```

[Runtime/MotionSettings.cs · L37](../../../source/Runtime/MotionSettings.cs.html#L37)

## DelayType

Apply Delay before the first pass or before every loop.

```csharp
public DelayType DelayType { get; init; }
```

[Runtime/MotionSettings.cs · L38](../../../source/Runtime/MotionSettings.cs.html#L38)

## Loops

Configured number of loops.

```csharp
public int Loops { get; init; }
```

[Runtime/MotionSettings.cs · L39](../../../source/Runtime/MotionSettings.cs.html#L39)

## LoopType

Select Restart, Flip, Incremental or Yoyo for repeated passes.

```csharp
public LoopType LoopType { get; init; }
```

[Runtime/MotionSettings.cs · L40](../../../source/Runtime/MotionSettings.cs.html#L40)

## CancelOnError

Whether a setter exception cancels the motion.

```csharp
public bool CancelOnError { get; init; }
```

[Runtime/MotionSettings.cs · L41](../../../source/Runtime/MotionSettings.cs.html#L41)

## SkipValuesDuringDelay

Whether to suppress writes to the binding during a delay.

```csharp
public bool SkipValuesDuringDelay { get; init; }
```

[Runtime/MotionSettings.cs · L42](../../../source/Runtime/MotionSettings.cs.html#L42)

## ImmediateBind

Whether binding writes the initial sampled value immediately.

```csharp
public bool ImmediateBind { get; init; }
```

[Runtime/MotionSettings.cs · L43](../../../source/Runtime/MotionSettings.cs.html#L43)

## Scheduler

Scheduler used when creating a tween from these settings.

```csharp
public IMotionScheduler Scheduler { get; init; }
```

[Runtime/MotionSettings.cs · L44](../../../source/Runtime/MotionSettings.cs.html#L44)
