Parent Values

From Resonite Wiki
(Redirected from Parent value)

Parent Values, also implemented as Parent References, is a tag-based system of data sharing between a Slot and its immediate children. It is generally a more limited, yet simpler and faster, version of dynamic variables. Its main use case is for sharing data between a SnapTarget and the Snapper that is attached to the target.

Overview

A parent value system is composed of two components: A parent value and a parent value link. For value types, these are the ParentValue and ParentValueLink components, while for reference types, these are the ParentReference and ParentReferenceLink components. For brevity, this article will describe with value types, but the system is the exact same for reference types.

The ParentValue component has a Tag field on it. Any ParentValueLink components must be on one of the slot's immediate children and have a matching Tag to link to the ParentValue. From there, the ParentValueLink component can drive a field with the value from the ParentValue. If the link component can't find a matching ParentValue on its immediate parent, then the DefaultValue will be used instead.

See Also