MaterialMotionExtensions
Write float, int or Color values into a Material using a property name or ID.
public static class MaterialMotionExtensionsRenderingMotionExtensions.cs · L130Members
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
builderthis FloatMotionBuilderConfigured builder, passed as the receiver for extension calls.materialMaterialTarget Material that receives the update.namestringName 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
builderthis MotionBuilder<float, TOptions, TAdapter>Configured builder, passed as the receiver for extension calls.materialMaterialTarget Material that receives the update.namestringName of the target property.- Returns
MotionHandle
public static MotionHandle BindToMaterialFloat(this FloatMotionBuilder builder, Material material, int nameID)Parameters and return value
builderthis FloatMotionBuilderConfigured builder, passed as the receiver for extension calls.materialMaterialTarget Material that receives the update.nameIDintUnity 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
builderthis MotionBuilder<float, TOptions, TAdapter>Configured builder, passed as the receiver for extension calls.materialMaterialTarget Material that receives the update.nameIDintUnity 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
builderthis MotionBuilder<int, TOptions, TAdapter>Configured builder, passed as the receiver for extension calls.materialMaterialTarget Material that receives the update.namestringName 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
builderthis MotionBuilder<int, TOptions, TAdapter>Configured builder, passed as the receiver for extension calls.materialMaterialTarget Material that receives the update.nameIDintUnity 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
builderthis MotionBuilder<Color, TOptions, TAdapter>Configured builder, passed as the receiver for extension calls.materialMaterialTarget Material that receives the update.namestringName 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
builderthis MotionBuilder<Color, TOptions, TAdapter>Configured builder, passed as the receiver for extension calls.materialMaterialTarget Material that receives the update.nameIDintUnity integer ID for the named property.- Returns
MotionHandle
MeatMotion