Component:ValueField: Difference between revisions

From Resonite Wiki
Manual file update, fix translation markers
Automated: update Categories
Line 28: Line 28:
[[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:Components:Data{{#translation:}}|Value Field`1]]
[[Category:Components:Data{{#translation:}}|Value Field`1]]

Revision as of 20:51, 3 March 2024

The ValueField component contains a single field of a specific datatype that is selected when the component is attached.

Component image 
Value Field`1 component as seen in the Scene Inspector


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.
Value T

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 DataModelStore node.

Examples

A ValueField<floatQ> being used as the input of a ValueCopy<floatQ>

A ValueField could be used when another component requires an input of an external value.

Related Components