Forum

VL - FromValue node creates spread that triggers Changed every frame

vl

#1

I have to use FromValue to create spreads from custom types defined in C# structs. I also want to determine if any of the items in this new spread are changing in the current frame. FromValue seems to mutate the spread even if the input is the same such that Changed will always trigger.

If I have to, I can implement a Changed in my structs to take a struct instance (from VL from the previous frame) and compare them member by member, but I’d like to avoid this annoyance if possible and use Changed as it was intended. Is there a clean way around this?


#2

you are right, the FromValue will create a new spread every frame and therefore trigger the change detection of the cache region.

if you have only one value, you can simply move the FromValue node inside the cache region and connect your single instance to the region.