# UniRxMotionExtensions

ビルダーからUniRxのObservableを作成し、Tweenの値をReactivePropertyにバインドします。

Namespace: MeatMotion

Assembly: MeatMotion.Integrations.UniRx

```csharp
public static class UniRxMotionExtensions
```

使用条件　com.neuecc.unirx

[Runtime/Integrations/UniRx/UniRxMotionExtensions.cs · L6](../../source/Runtime/Integrations/UniRx/UniRxMotionExtensions.cs.html#L6)

## ToObservable

ビルダーをバインドして値を通知するストリームを返します。Tweenの完了とキャンセルのどちらでもストリームが終了します。

```csharp
public static IObservable<float> ToObservable(this FloatMotionBuilder builder)
```

引数と戻り値

- `builder` (`this FloatMotionBuilder`) 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
- 戻り値: `IObservable<float>`

[Runtime/Integrations/UniRx/UniRxMotionExtensions.cs · L8](../../source/Runtime/Integrations/UniRx/UniRxMotionExtensions.cs.html#L8)

```csharp
public static IObservable<TValue> ToObservable<TValue, TOptions, TAdapter>(this MotionBuilder<TValue, TOptions, TAdapter> builder)
    where TValue : unmanaged
    where TOptions : unmanaged, IMotionOptions
    where TAdapter : unmanaged, IMotionAdapter<TValue, TOptions>
```

引数と戻り値

- `builder` (`this MotionBuilder<TValue, TOptions, TAdapter>`) 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
- 戻り値: `IObservable<TValue>`

[Runtime/Integrations/UniRx/UniRxMotionExtensions.cs · L11](../../source/Runtime/Integrations/UniRx/UniRxMotionExtensions.cs.html#L11)

## BindToReactiveProperty

補間値を登録したReactivePropertyのValueへ書き込みます。

```csharp
public static MotionHandle BindToReactiveProperty(this FloatMotionBuilder builder, ReactiveProperty<float> reactiveProperty)
```

引数と戻り値

- `builder` (`this FloatMotionBuilder`) 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
- `reactiveProperty` (`ReactiveProperty<float>`) 補間した値を書き込むリアクティブプロパティ。
- 戻り値: `MotionHandle`

[Runtime/Integrations/UniRx/UniRxMotionExtensions.cs · L20](../../source/Runtime/Integrations/UniRx/UniRxMotionExtensions.cs.html#L20)

```csharp
public static MotionHandle BindToReactiveProperty<TValue, TOptions, TAdapter>(this MotionBuilder<TValue, TOptions, TAdapter> builder, ReactiveProperty<TValue> reactiveProperty)
    where TValue : unmanaged
    where TOptions : unmanaged, IMotionOptions
    where TAdapter : unmanaged, IMotionAdapter<TValue, TOptions>
```

引数と戻り値

- `builder` (`this MotionBuilder<TValue, TOptions, TAdapter>`) 設定済みのビルダー。拡張メソッドでは呼び出し元として渡されます。
- `reactiveProperty` (`ReactiveProperty<TValue>`) 補間した値を書き込むリアクティブプロパティ。
- 戻り値: `MotionHandle`

[Runtime/Integrations/UniRx/UniRxMotionExtensions.cs · L23](../../source/Runtime/Integrations/UniRx/UniRxMotionExtensions.cs.html#L23)
