Skip to content

CVR Material Driver

Sets specific Material properties on Renderers. This lets you animate a mesh with multiple materials sharing the same shader while targeting one specific material.

Up to 16 materials × 4 channels (X, Y, Z, W). A single CVR Material Driver can drive up to 16 Materials. The slot inputs material01X…material16W are hidden on the inspector and are intended to be driven by animation curves.

List of CVRMaterialDriverTask entries. Each task binds one of the 16 slots to a material property on a Renderer.

Material 01 is the first task in the list. X, Y, Z, and W are the four channels of the selected property. Each frame (Update), every task reads its four channel values and writes them back to the target material property.

Each entry in the tasks list has the following fields:

NameTypeDescription
RendererRendererTarget renderer. The task skips itself if the renderer is null.
IndexintIndex into Renderer.materials to drive. The operation instantiates the material.
RendererTypestringCached renderer type name; populated by the inspector.
PropertyNamestringShader property name on the target material.
PropertyTypeTypeOne of Float, Vector4, Color.
valuesVector4Last committed value, used to avoid redundant writes.
  • Float Only the X channel is written via SetFloat.
  • Vector4 All four channels are written via SetVector.
  • Color All four channels are written via SetColor.
  • CVR-GameFiles/ABI.CCK.Components/CVRMaterialDriver.cs
  • CVR-GameFiles/ABI.CCK.Components/CVRMaterialDriverTask.cs