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.
Properties
Section titled “Properties”Material slots
Section titled “Material slots”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.
How it works
Section titled “How it works”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.
Task shape
Section titled “Task shape”Each entry in the tasks list has the following fields:
| Name | Type | Description |
|---|---|---|
Renderer | Renderer | Target renderer. The task skips itself if the renderer is null. |
Index | int | Index into Renderer.materials to drive. The operation instantiates the material. |
RendererType | string | Cached renderer type name; populated by the inspector. |
PropertyName | string | Shader property name on the target material. |
PropertyType | Type | One of Float, Vector4, Color. |
values | Vector4 | Last committed value, used to avoid redundant writes. |
Property types
Section titled “Property types”- 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.
Source
Section titled “Source”CVR-GameFiles/ABI.CCK.Components/CVRMaterialDriver.csCVR-GameFiles/ABI.CCK.Components/CVRMaterialDriverTask.cs