# MaterialMotionExtensions

Write float, int or Color values into a Material using a property name or ID.

Namespace: MeatMotion.Extensions

Assembly: MeatMotion

```csharp
public static class MaterialMotionExtensions
```

[Runtime/Bindings/Rendering/RenderingMotionExtensions.cs · L130](../../../source/Runtime/Bindings/Rendering/RenderingMotionExtensions.cs.html#L130)

## BindToMaterialFloat

Choose the MaterialFloat property by name or integer ID. The name overload resolves Shader.PropertyToID when binding.

```csharp
public static MotionHandle BindToMaterialFloat(this FloatMotionBuilder builder, Material material, string name)
```

Parameters and return value

- `builder` (`this FloatMotionBuilder`) Configured builder, passed as the receiver for extension calls.
- `material` (`Material`) Target Material that receives the update.
- `name` (`string`) Name of the target property.
- Returns: `MotionHandle`

[Runtime/Bindings/Rendering/RenderingMotionExtensions.cs · L132](../../../source/Runtime/Bindings/Rendering/RenderingMotionExtensions.cs.html#L132)

```csharp
public static MotionHandle BindToMaterialFloat<TOptions, TAdapter>(this MotionBuilder<float, TOptions, TAdapter> builder, Material material, string name)
    where TOptions : unmanaged, IMotionOptions
    where TAdapter : unmanaged, IMotionAdapter<float, TOptions>
```

Parameters and return value

- `builder` (`this MotionBuilder<float, TOptions, TAdapter>`) Configured builder, passed as the receiver for extension calls.
- `material` (`Material`) Target Material that receives the update.
- `name` (`string`) Name of the target property.
- Returns: `MotionHandle`

[Runtime/Bindings/Rendering/RenderingMotionExtensions.cs · L135](../../../source/Runtime/Bindings/Rendering/RenderingMotionExtensions.cs.html#L135)

```csharp
public static MotionHandle BindToMaterialFloat(this FloatMotionBuilder builder, Material material, int nameID)
```

Parameters and return value

- `builder` (`this FloatMotionBuilder`) Configured builder, passed as the receiver for extension calls.
- `material` (`Material`) Target Material that receives the update.
- `nameID` (`int`) Unity integer ID for the named property.
- Returns: `MotionHandle`

[Runtime/Bindings/Rendering/RenderingMotionExtensions.cs · L140](../../../source/Runtime/Bindings/Rendering/RenderingMotionExtensions.cs.html#L140)

```csharp
public static MotionHandle BindToMaterialFloat<TOptions, TAdapter>(this MotionBuilder<float, TOptions, TAdapter> builder, Material material, int nameID)
    where TOptions : unmanaged, IMotionOptions
    where TAdapter : unmanaged, IMotionAdapter<float, TOptions>
```

Parameters and return value

- `builder` (`this MotionBuilder<float, TOptions, TAdapter>`) Configured builder, passed as the receiver for extension calls.
- `material` (`Material`) Target Material that receives the update.
- `nameID` (`int`) Unity integer ID for the named property.
- Returns: `MotionHandle`

[Runtime/Bindings/Rendering/RenderingMotionExtensions.cs · L143](../../../source/Runtime/Bindings/Rendering/RenderingMotionExtensions.cs.html#L143)

## BindToMaterialInt

Choose the MaterialInt property by name or integer ID. The name overload resolves Shader.PropertyToID when binding.

```csharp
public static MotionHandle BindToMaterialInt<TOptions, TAdapter>(this MotionBuilder<int, TOptions, TAdapter> builder, Material material, string name)
    where TOptions : unmanaged, IMotionOptions
    where TAdapter : unmanaged, IMotionAdapter<int, TOptions>
```

Parameters and return value

- `builder` (`this MotionBuilder<int, TOptions, TAdapter>`) Configured builder, passed as the receiver for extension calls.
- `material` (`Material`) Target Material that receives the update.
- `name` (`string`) Name of the target property.
- Returns: `MotionHandle`

[Runtime/Bindings/Rendering/RenderingMotionExtensions.cs · L149](../../../source/Runtime/Bindings/Rendering/RenderingMotionExtensions.cs.html#L149)

```csharp
public static MotionHandle BindToMaterialInt<TOptions, TAdapter>(this MotionBuilder<int, TOptions, TAdapter> builder, Material material, int nameID)
    where TOptions : unmanaged, IMotionOptions
    where TAdapter : unmanaged, IMotionAdapter<int, TOptions>
```

Parameters and return value

- `builder` (`this MotionBuilder<int, TOptions, TAdapter>`) Configured builder, passed as the receiver for extension calls.
- `material` (`Material`) Target Material that receives the update.
- `nameID` (`int`) Unity integer ID for the named property.
- Returns: `MotionHandle`

[Runtime/Bindings/Rendering/RenderingMotionExtensions.cs · L154](../../../source/Runtime/Bindings/Rendering/RenderingMotionExtensions.cs.html#L154)

## BindToMaterialColor

Choose the MaterialColor property by name or integer ID. The name overload resolves Shader.PropertyToID when binding.

```csharp
public static MotionHandle BindToMaterialColor<TOptions, TAdapter>(this MotionBuilder<Color, TOptions, TAdapter> builder, Material material, string name)
    where TOptions : unmanaged, IMotionOptions
    where TAdapter : unmanaged, IMotionAdapter<Color, TOptions>
```

Parameters and return value

- `builder` (`this MotionBuilder<Color, TOptions, TAdapter>`) Configured builder, passed as the receiver for extension calls.
- `material` (`Material`) Target Material that receives the update.
- `name` (`string`) Name of the target property.
- Returns: `MotionHandle`

[Runtime/Bindings/Rendering/RenderingMotionExtensions.cs · L160](../../../source/Runtime/Bindings/Rendering/RenderingMotionExtensions.cs.html#L160)

```csharp
public static MotionHandle BindToMaterialColor<TOptions, TAdapter>(this MotionBuilder<Color, TOptions, TAdapter> builder, Material material, int nameID)
    where TOptions : unmanaged, IMotionOptions
    where TAdapter : unmanaged, IMotionAdapter<Color, TOptions>
```

Parameters and return value

- `builder` (`this MotionBuilder<Color, TOptions, TAdapter>`) Configured builder, passed as the receiver for extension calls.
- `material` (`Material`) Target Material that receives the update.
- `nameID` (`int`) Unity integer ID for the named property.
- Returns: `MotionHandle`

[Runtime/Bindings/Rendering/RenderingMotionExtensions.cs · L165](../../../source/Runtime/Bindings/Rendering/RenderingMotionExtensions.cs.html#L165)
