Component:ParentValue: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
unstub
 
Line 1: Line 1:
{{Infobox Component
{{Infobox Component
|Image=ParentValue`1Component.png
|Image=ParentValue`1Component.png
|Name=Parent Value`1
|Name=ParentValue<float>
}}
}}
{{stub}}


== Usage ==
The '''ParentValue<T>''' component provides a [[value type]] for the [[parent value]] system.
 
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Tag|String|
|Tag|String|Tag of the parent value. Compatible [[Component:ParentValueLink|ParentValueLink]] components on the slot's immediate children must have the same tag.
|Value|'''T'''|TypeAdv1=true|
|Value|'''T'''|TypeAdv1=true|The value of the parent value associated with the <code>Tag</code> and type.
}}
}}


== Behavior ==
== Usage ==
 
When this component is on a slot, all immediate children are part of its parent value system. Any immediate children of the slot with a [[Component:ParentValueLink|ParentValueLink]] component that matches the type and <code>Tag</code> of this component will be linked to the <code>Value</code> provided by this component.
 
This can be especially useful for [[Component:Snapper|Snapper]]/[[Component:SnapTarget|SnapTarget]] systems.


== Examples ==
== Examples ==
Line 17: Line 22:
== See Also ==
== See Also ==


[[Category:Components:Data:Parent{{#translation:}}|Parent Value`1]]
* [[Component:ParentReference]], for [[reference types]].
[[Category:Components{{#translation:}}|Parent Value`1]]
 
[[Category:Generic Components{{#translation:}}|Parent Value`1]]
[[Category:Components:Data:Parent{{#translation:}}]]
[[Category:ComponentStubs]]
[[Category:Components{{#translation:}}]]
[[Category:Generic Components{{#translation:}}]]

Latest revision as of 19:54, 18 December 2024

Component image 
ParentValue<float> component as seen in the Scene Inspector


The ParentValue<T> component provides a value type for the parent value system.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
Tag String Tag of the parent value. Compatible ParentValueLink components on the slot's immediate children must have the same tag.
Value T The value of the parent value associated with the Tag and type.

Usage

When this component is on a slot, all immediate children are part of its parent value system. Any immediate children of the slot with a ParentValueLink component that matches the type and Tag of this component will be linked to the Value provided by this component.

This can be especially useful for Snapper/SnapTarget systems.

Examples

See Also