The '''DynamicField<T>''' binds the [[field]] pointed to by <code>TargetField</code> to the [[dynamic variable]] referred to by <code>VariableName</code>. The field must be a [[value type]].
<!--T:2-->
== Intoduction ==
The '''DynamicField`1''' component points at a field containing a value type. The value of the its variable is whatever the field contains, and the field will be updated if the variable is written to.
For demonstration purposes, this component is shown with a [[Type:Float|float]] type.
<!--T:3-->
<!--T:3-->
== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|VariableName|String|The name of the dynamic variable to be used
|VariableName|String|The name of the dynamic variable to be used
|TargetField|{{RootFieldType|RelayRef`1|[[Type:IField`1|IField`1]]<T>}}|TypeAdv1=true|The field that will be used as the dynamic variable's value
|TargetField|{{RootFieldType|RelayRef`1|[[Type:IField`1|IField`1]]<T>}}|TypeAdv1=true|The field that will be used as the dynamic variable's value.
|OverrideOnLink|Bool|If true, the value of the field will be written when this component is moved into a new space
|OverrideOnLink|Bool|If true, the value of the field will be written when this component is moved into a new space
}}
}}
<!--T:4-->
<!--T:4-->
== Behavior ==
== Usage ==
This component works almost exactly like the [[Component:DynamicValueVariable|DynamicValueVariable]] component, except that the value used for the dynamic variable is sourced from a separate field. This field will be automatically updated with the value of the dynamic variable, and writing to the field will write to the dynamic variable. This can be used to directly bind fields of separate components as a dynamic variable without having to use a [[Component:DynamicValueVariableDriver|DynamicValueVariableDriver]] or similar setup.
<!--T:5-->
<!--T:5-->
Line 29:
Line 24:
<!--T:6-->
<!--T:6-->
== Related Components ==
== See Also ==
* [[Dynamic Variables]]
* [[Component:DynamicReference]], for the same functionality but with [[reference types]].
If true, the value of the field will be written when this component is moved into a new space
Usage
This component works almost exactly like the DynamicValueVariable component, except that the value used for the dynamic variable is sourced from a separate field. This field will be automatically updated with the value of the dynamic variable, and writing to the field will write to the dynamic variable. This can be used to directly bind fields of separate components as a dynamic variable without having to use a DynamicValueVariableDriver or similar setup.