# MotionDispatcher

自動更新のストレージ予約・クリアと、処理されなかった例外の通知先を管理します。

Namespace: MeatMotion

Assembly: MeatMotion

```csharp
public static class MotionDispatcher
```

[Runtime/Scheduling/MotionDispatcher.cs · L9](../../source/Runtime/Scheduling/MotionDispatcher.cs.html#L9)

## RegisterUnhandledExceptionHandler

未処理例外の通知先を設定します。既定の通知先はDebug.LogExceptionです。

```csharp
public static void RegisterUnhandledExceptionHandler(Action<Exception> unhandledExceptionHandler)
```

引数

- `unhandledExceptionHandler` (`Action<Exception>`) 処理されなかった例外を受け取るコールバック。

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

## GetUnhandledExceptionHandler

現在登録されている例外の通知先を取得します。

```csharp
public static Action<Exception> GetUnhandledExceptionHandler()
```

戻り値

- 戻り値: `Action<Exception>`

[Runtime/Scheduling/MotionDispatcher.cs · L13](../../source/Runtime/Scheduling/MotionDispatcher.cs.html#L13)

## Clear

自動更新用ストレージのTweenをクリアします。

```csharp
public static void Clear()
```

[Runtime/Scheduling/MotionDispatcher.cs · L15](../../source/Runtime/Scheduling/MotionDispatcher.cs.html#L15)

## EnsureStorageCapacity

型の組み合わせに対して自動更新用ストレージを予約します。

```csharp
public static void EnsureStorageCapacity<TValue, TOptions, TAdapter>(int capacity)
    where TValue : unmanaged
    where TOptions : unmanaged, IMotionOptions
    where TAdapter : unmanaged, IMotionAdapter<TValue, TOptions>
```

引数

- `capacity` (`int`) 事前に確保する要素数。

[Runtime/Scheduling/MotionDispatcher.cs · L16](../../source/Runtime/Scheduling/MotionDispatcher.cs.html#L16)
