MeatMotion

MaterialMotionExtensions

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

Namespace
MeatMotion.Extensions
Assembly
MeatMotion

Jump to members

public static class MaterialMotionExtensions
RenderingMotionExtensions.cs · L130

Members

BindToMaterialFloat

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

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
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
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
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

BindToMaterialInt

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

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
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

BindToMaterialColor

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

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
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