CVR Variable Buffer
Stores a single float variable on a GameObject. Other components can interact with the buffer via method calls or through CVR Interactable triggers and actions. Interactables that reference the buffer are notified on write (subject to a 100ms throttle).
Fields
Section titled “Fields”Default Value
Section titled “Default Value”float. Initial value assigned to value on Start.
float. Current buffer value. Read at runtime by interactables and parameter streams.
SetValue(float valueToSet)— write the buffer and notify every linked interactable viaOnVariableBufferChange. Notifications are rate-limited: after a notify pass is sent, further writes within the 100msResetSendUpdatetick reuse the suppressed state.SuppressNextUpdate()— request that the nextSetValuecall skip the notify pass.AddInteracteable(CVRInteractable interactable)— registers an interactable as a listener. Normally called byCVRInteractableduringStartwhen any of its action or operationvarBufferValslots reference this buffer.
Update rate
Section titled “Update rate”A scheduled job (BetterScheduleSystem) runs every 100ms to reset the internal _sendUpdate flag. This means:
- Multiple
SetValuecalls within the same 100ms window only send one notification. - Use
SuppressNextUpdate()just before aSetValueto avoid redundant fan-out.
Related
Section titled “Related”Source
Section titled “Source”CVR-GameFiles/ABI.CCK.Components/CVRVariableBuffer.cs