Skip to content

CVR Texture Property Parser

Reads a pixel’s color-channel value from a texture and lerps it between a minimum and maximum value before writing it to a target property.

Selects how the texture reference is resolved.

  • Local Texture Reference an object in your scene directly.
  • Global Texture Reference a texture exposed by, for example, the CVR Global Shader Updater.

Direct reference to a render texture (only shown when Type is Local Texture).

Reference name of a global render texture (only shown when Type is Global Texture). Globals are typically exposed by the CVR Global Shader Updater.

A task describes how a value is parsed and where it is written. You can configure multiple tasks. Each task has the following properties.

X/Y coordinates in pixels. x 0, y 0 is the first pixel.

Which color channel to read.

Minimum and maximum values used when lerping the color-channel value.

Target GameObject that receives the value.

Component on the target GameObject. All components on the GameObject are listed.

Public property on the selected component.

When the target property is one of these types, the parser can write to it. The read color channel is lerped between Min Value and Max Value, then written into the property. For multi-channel targets, Target Index picks which channel of the property receives the value.

TypeTarget IndexWrite behaviour
floatDirect write of the lerped value.
intCast to int.
booltrue when the value is ≥ 0.5.
Vector201Writes X or Y.
Vector302Writes X, Y, or Z.
Vector403Writes X, Y, Z, or W.
Color03Writes R, G, B, or A.

The target property is resolved via reflection: public fields first, then public writable properties. Both assemblies’ public API is allowed.

Texture sampling is asynchronous: the component enqueues a pixel read, Unity converts the render texture to a native Color32 array on a worker, and only then is the callback invoked and the target property updated. Queued writes per texture are batched into a single conversion.

Prefab-bound targets and components are ignored — the parser skips any target or component whose GameObject is part of an uninstantiated prefab.

  • CVR-GameFiles/ABI.CCK.Components/CVRTexturePropertyParser.cs
  • CVR-GameFiles/ABI.CCK.Components/CVRTexturePropertyParserTask.cs