Automated: update Categories |
Update formatting. Add info |
||
Line 1: | Line 1: | ||
<languages></languages> | <languages></languages> | ||
<translate> | <translate> | ||
{{Infobox Component | {{Infobox Component | ||
|Image=ValueField`1Component.png | |Image=ValueField`1Component.png | ||
|Name=Value Field`1 | |Name=Value Field`1 | ||
}} | }} | ||
The ValueField component contains a single field of a specific datatype that is selected when the component is attached. | |||
<!--T:2--> | <!--T:2--> | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Value|'''T'''|TypeAdv0=true| | |Value|'''T'''|TypeAdv0=true| The value this component is storing. | ||
}} | }} | ||
<!--T:3--> | <!--T:3--> | ||
== Usage == | == Usage == | ||
The ValueField component can be used to store a single value on a slot that can be edited from the [[Scene Inspector|inspector]], or with other [[components]] and [[ProtoFlux]]. However, in cases where you want to be able to dynamically reference the value instead of directly referencing it, you may be better off using a [[DynamicValueVariable`1 (Component)|dynamic variable]], and in use cases where you want to easily reference and edit a value within a [[ProtoFlux]] script while still exposing that value to the data model, you may want to use the [[ | The ValueField component can be used to store a single value on a slot that can be edited from the [[Scene Inspector|inspector]], or with other [[components]] and [[ProtoFlux]]. However, in cases where you want to be able to dynamically reference the value instead of directly referencing it, you may be better off using a [[DynamicValueVariable`1 (Component)|dynamic variable]], and in use cases where you want to easily reference and edit a value within a [[ProtoFlux]] script while still exposing that value to the data model, you may want to use the [[ProtoFlux:Data Model Store|Data Model Store]] node. | ||
<!--T:4--> | <!--T:4--> | ||
Line 23: | Line 23: | ||
<!--T:5--> | <!--T:5--> | ||
== | == See Also == | ||
</translate> | </translate> | ||
[[Category:Generics{{#translation:}}]] | [[Category:Generics{{#translation:}}]] | ||
[[Category:Components{{#translation:}}|Value Field`1]] | [[Category:Components{{#translation:}}|Value Field`1]] | ||
[[Category:Generic Components{{#translation:}}|Value Field`1]] | [[Category:Generic Components{{#translation:}}|Value Field`1]] | ||
[[Category:Components:Data{{#translation:}}|Value Field`1]] | [[Category:Components:Data{{#translation:}}|Value Field`1]] |
Revision as of 03:23, 12 November 2024
Component image
The ValueField component contains a single field of a specific datatype that is selected when the component is attached.
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. |
Value
|
T | The value this component is storing. |
Usage
The ValueField component can be used to store a single value on a slot that can be edited from the inspector, or with other components and ProtoFlux. However, in cases where you want to be able to dynamically reference the value instead of directly referencing it, you may be better off using a dynamic variable, and in use cases where you want to easily reference and edit a value within a ProtoFlux script while still exposing that value to the data model, you may want to use the Data Model Store node.
Examples
A ValueField could be used when another component requires an input of an external value.